summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-05-24 23:37:09 +0200
committerMichael Adam <obnox@samba.org>2010-05-25 10:35:26 +0200
commitf3053739b7e62e4749821bf2283d67ec379b1abc (patch)
tree68170a7865e93bff63606528779cafca264212fd /source3
parente3f7fab668c1bf1366257f64a5099cca919ca358 (diff)
downloadsamba-f3053739b7e62e4749821bf2283d67ec379b1abc.tar.gz
samba-f3053739b7e62e4749821bf2283d67ec379b1abc.tar.bz2
samba-f3053739b7e62e4749821bf2283d67ec379b1abc.zip
s3:registry: move prototype registry_create_admin_token() to new header reg_util_token.h
and use it only where necessary.
Diffstat (limited to 'source3')
-rw-r--r--source3/include/registry.h2
-rw-r--r--source3/lib/smbconf/smbconf_reg.c1
-rw-r--r--source3/registry/reg_util_token.c1
-rw-r--r--source3/registry/reg_util_token.h26
-rw-r--r--source3/utils/net_registry.c1
5 files changed, 29 insertions, 2 deletions
diff --git a/source3/include/registry.h b/source3/include/registry.h
index 0914ba5486..33234037d7 100644
--- a/source3/include/registry.h
+++ b/source3/include/registry.h
@@ -67,8 +67,6 @@ WERROR registry_init_full(void);
/* The following definitions come from registry/reg_init_smbconf.c */
-NTSTATUS registry_create_admin_token(TALLOC_CTX *mem_ctx,
- NT_USER_TOKEN **ptoken);
WERROR registry_init_smbconf(const char *keyname);
/* The following definitions come from lib/util_reg_api.c */
diff --git a/source3/lib/smbconf/smbconf_reg.c b/source3/lib/smbconf/smbconf_reg.c
index f6602676e2..4aa3c09def 100644
--- a/source3/lib/smbconf/smbconf_reg.c
+++ b/source3/lib/smbconf/smbconf_reg.c
@@ -21,6 +21,7 @@
#include "lib/smbconf/smbconf_private.h"
#include "registry.h"
#include "registry/reg_backend_db.h"
+#include "registry/reg_util_token.h"
#include "lib/smbconf/smbconf_init.h"
#include "lib/smbconf/smbconf_reg.h"
diff --git a/source3/registry/reg_util_token.c b/source3/registry/reg_util_token.c
index 08ed4f4311..f218dfa472 100644
--- a/source3/registry/reg_util_token.c
+++ b/source3/registry/reg_util_token.c
@@ -18,6 +18,7 @@
*/
#include "includes.h"
+#include "reg_util_token.h"
/*
* create a fake token just with enough rights to
diff --git a/source3/registry/reg_util_token.h b/source3/registry/reg_util_token.h
new file mode 100644
index 0000000000..80cec49fcc
--- /dev/null
+++ b/source3/registry/reg_util_token.h
@@ -0,0 +1,26 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * Registry helper routines
+ * Copyright (C) Michael Adam 2007
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _REG_UTIL_TOKEN_H
+#define _REG_UTIL_TOKEN_H
+
+NTSTATUS registry_create_admin_token(TALLOC_CTX *mem_ctx,
+ NT_USER_TOKEN **ptoken);
+
+#endif /* _REG_UTIL_TOKEN_H */
diff --git a/source3/utils/net_registry.c b/source3/utils/net_registry.c
index 0c3aea0f4a..53cce12360 100644
--- a/source3/utils/net_registry.c
+++ b/source3/utils/net_registry.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "registry.h"
+#include "registry/reg_util_token.h"
#include "utils/net.h"
#include "utils/net_registry_util.h"
#include "include/g_lock.h"