s3:registry: move prototype registry_create_admin_token() to new header reg_util_token.h
authorMichael Adam <obnox@samba.org>
Mon, 24 May 2010 21:37:09 +0000 (23:37 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 25 May 2010 08:35:26 +0000 (10:35 +0200)
and use it only where necessary.

source3/include/registry.h
source3/lib/smbconf/smbconf_reg.c
source3/registry/reg_util_token.c
source3/registry/reg_util_token.h [new file with mode: 0644]
source3/utils/net_registry.c

index 0914ba5486674dd96d081185b72bedd7289f415c..33234037d7b2cad997b9ebebdc94f2b28860fc59 100644 (file)
@@ -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  */
index f6602676e21f10be7057b93e9c05d914bb635e0c..4aa3c09defe6f0156868d606d5dee9d2d6e92e59 100644 (file)
@@ -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"
 
index 08ed4f4311b785ea8d68445be940aaf0cf1e219d..f218dfa472b43f7ee1595b44a09e8a9dfa321e22 100644 (file)
@@ -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 (file)
index 0000000..80cec49
--- /dev/null
@@ -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 */
index 0c3aea0f4af95838cfb8b13409887fe5a3113db6..53cce1236066507c91f8f3acfde9d8387a53a89b 100644 (file)
@@ -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"