s3:registry: move the reg_api prototypes to their own header.
authorMichael Adam <obnox@samba.org>
Tue, 21 Sep 2010 06:11:18 +0000 (08:11 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 21 Sep 2010 06:52:06 +0000 (08:52 +0200)
libgpo/gpext/gpext.c
source3/include/registry.h
source3/lib/smbconf/smbconf_reg.c
source3/libgpo/gpo_reg.c
source3/registry/reg_api.c
source3/registry/reg_api.h [new file with mode: 0644]
source3/registry/reg_api_util.c
source3/rpc_server/srv_eventlog_nt.c
source3/rpc_server/srv_winreg_nt.c
source3/services/services_db.c
source3/utils/net_registry.c

index 6b81575024632c4378f747180804c7dd8b2803dc..8c70f65221b97fa17148ae025192e3bbf29cd74f 100644 (file)
@@ -25,6 +25,7 @@
 #if _SAMBA_BUILD_ == 3
 #include "libgpo/gpo_proto.h"
 #include "registry.h"
 #if _SAMBA_BUILD_ == 3
 #include "libgpo/gpo_proto.h"
 #include "registry.h"
+#include "registry/reg_api.h"
 #endif
 
 static struct gp_extension *extensions = NULL;
 #endif
 
 static struct gp_extension *extensions = NULL;
index 600fffe679b9d950889b0f07e69f10a33205feb7..3a8a7aaabfb25e9a7f34bf175a81f58b8dbe58b3 100644 (file)
@@ -130,53 +130,6 @@ struct registry_key {
 #define REG_KEY_HKPT           2
 
 
 #define REG_KEY_HKPT           2
 
 
-/* The following definitions come from registry/reg_api.c  */
-
-WERROR reg_openhive(TALLOC_CTX *mem_ctx, const char *hive,
-                   uint32 desired_access,
-                   const struct security_token *token,
-                   struct registry_key **pkey);
-WERROR reg_openkey(TALLOC_CTX *mem_ctx, struct registry_key *parent,
-                  const char *name, uint32 desired_access,
-                  struct registry_key **pkey);
-WERROR reg_enumkey(TALLOC_CTX *mem_ctx, struct registry_key *key,
-                  uint32 idx, char **name, NTTIME *last_write_time);
-WERROR reg_enumvalue(TALLOC_CTX *mem_ctx, struct registry_key *key,
-                    uint32 idx, char **pname, struct registry_value **pval);
-WERROR reg_queryvalue(TALLOC_CTX *mem_ctx, struct registry_key *key,
-                     const char *name, struct registry_value **pval);
-WERROR reg_querymultiplevalues(TALLOC_CTX *mem_ctx,
-                              struct registry_key *key,
-                              uint32_t num_names,
-                              const char **names,
-                              uint32_t *pnum_vals,
-                              struct registry_value **pvals);
-WERROR reg_queryinfokey(struct registry_key *key, uint32_t *num_subkeys,
-                       uint32_t *max_subkeylen, uint32_t *max_subkeysize,
-                       uint32_t *num_values, uint32_t *max_valnamelen,
-                       uint32_t *max_valbufsize, uint32_t *secdescsize,
-                       NTTIME *last_changed_time);
-WERROR reg_createkey(TALLOC_CTX *ctx, struct registry_key *parent,
-                    const char *subkeypath, uint32 desired_access,
-                    struct registry_key **pkey,
-                    enum winreg_CreateAction *paction);
-WERROR reg_deletekey(struct registry_key *parent, const char *path);
-WERROR reg_setvalue(struct registry_key *key, const char *name,
-                   const struct registry_value *val);
-WERROR reg_deletevalue(struct registry_key *key, const char *name);
-WERROR reg_getkeysecurity(TALLOC_CTX *mem_ctx, struct registry_key *key,
-                         struct security_descriptor **psecdesc);
-WERROR reg_setkeysecurity(struct registry_key *key,
-                         struct security_descriptor *psecdesc);
-WERROR reg_getversion(uint32_t *version);
-WERROR reg_deleteallvalues(struct registry_key *key);
-WERROR reg_deletekey_recursive(TALLOC_CTX *ctx,
-                              struct registry_key *parent,
-                              const char *path);
-WERROR reg_deletesubkeys_recursive(TALLOC_CTX *ctx,
-                                  struct registry_key *parent,
-                                  const char *path);
-
 /* The following definitions come from registry/reg_api_regf.c  */
 
 WERROR reg_restorekey(struct registry_key *key, const char *fname);
 /* The following definitions come from registry/reg_api_regf.c  */
 
 WERROR reg_restorekey(struct registry_key *key, const char *fname);
index cafa3bfee479358fe6ba0939bfe320f665aa4fc7..f6d6bd7104a387a679816c050a8b741d14b874be 100644 (file)
@@ -20,6 +20,7 @@
 #include "includes.h"
 #include "lib/smbconf/smbconf_private.h"
 #include "registry.h"
 #include "includes.h"
 #include "lib/smbconf/smbconf_private.h"
 #include "registry.h"
+#include "registry/reg_api.h"
 #include "registry/reg_backend_db.h"
 #include "registry/reg_util_token.h"
 #include "registry/reg_api_util.h"
 #include "registry/reg_backend_db.h"
 #include "registry/reg_util_token.h"
 #include "registry/reg_api_util.h"
index 8c05b2f13212c39cc48f8088d4133917b9ffa93c..851fddcf20a71233abc18cb66d83b8cfb91c4b5f 100644 (file)
@@ -21,6 +21,7 @@
 #include "../libgpo/gpo.h"
 #include "libgpo/gpo_proto.h"
 #include "registry.h"
 #include "../libgpo/gpo.h"
 #include "libgpo/gpo_proto.h"
 #include "registry.h"
+#include "registry/reg_api.h"
 #include "registry/reg_backend_db.h"
 #include "registry/reg_api_util.h"
 
 #include "registry/reg_backend_db.h"
 #include "registry/reg_api_util.h"
 
index 2e40f2c5046044ac1892db6b94eb04fb4533fa04..31950f75cb883740fa6284156f651aeebf66bff4 100644 (file)
@@ -64,6 +64,7 @@
 
 #include "includes.h"
 #include "registry.h"
 
 #include "includes.h"
 #include "registry.h"
+#include "reg_api.h"
 #include "reg_cachehook.h"
 #include "reg_util_internal.h"
 #include "reg_backend_db.h"
 #include "reg_cachehook.h"
 #include "reg_util_internal.h"
 #include "reg_backend_db.h"
diff --git a/source3/registry/reg_api.h b/source3/registry/reg_api.h
new file mode 100644 (file)
index 0000000..2a4f6db
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ *  Unix SMB/CIFS implementation.
+ *
+ *  Virtual Windows Registry Layer
+ *
+ *  Copyright (C) Volker Lendecke 2006
+ *  Copyright (C) Michael Adam 2007-2010
+ *
+ *  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_API_H
+#define _REG_API_H
+
+WERROR reg_openhive(TALLOC_CTX *mem_ctx, const char *hive,
+                   uint32 desired_access,
+                   const struct security_token *token,
+                   struct registry_key **pkey);
+WERROR reg_openkey(TALLOC_CTX *mem_ctx, struct registry_key *parent,
+                  const char *name, uint32 desired_access,
+                  struct registry_key **pkey);
+WERROR reg_enumkey(TALLOC_CTX *mem_ctx, struct registry_key *key,
+                  uint32 idx, char **name, NTTIME *last_write_time);
+WERROR reg_enumvalue(TALLOC_CTX *mem_ctx, struct registry_key *key,
+                    uint32 idx, char **pname, struct registry_value **pval);
+WERROR reg_queryvalue(TALLOC_CTX *mem_ctx, struct registry_key *key,
+                     const char *name, struct registry_value **pval);
+WERROR reg_querymultiplevalues(TALLOC_CTX *mem_ctx,
+                              struct registry_key *key,
+                              uint32_t num_names,
+                              const char **names,
+                              uint32_t *pnum_vals,
+                              struct registry_value **pvals);
+WERROR reg_queryinfokey(struct registry_key *key, uint32_t *num_subkeys,
+                       uint32_t *max_subkeylen, uint32_t *max_subkeysize,
+                       uint32_t *num_values, uint32_t *max_valnamelen,
+                       uint32_t *max_valbufsize, uint32_t *secdescsize,
+                       NTTIME *last_changed_time);
+WERROR reg_createkey(TALLOC_CTX *ctx, struct registry_key *parent,
+                    const char *subkeypath, uint32 desired_access,
+                    struct registry_key **pkey,
+                    enum winreg_CreateAction *paction);
+WERROR reg_deletekey(struct registry_key *parent, const char *path);
+WERROR reg_setvalue(struct registry_key *key, const char *name,
+                   const struct registry_value *val);
+WERROR reg_deletevalue(struct registry_key *key, const char *name);
+WERROR reg_getkeysecurity(TALLOC_CTX *mem_ctx, struct registry_key *key,
+                         struct security_descriptor **psecdesc);
+WERROR reg_setkeysecurity(struct registry_key *key,
+                         struct security_descriptor *psecdesc);
+WERROR reg_getversion(uint32_t *version);
+WERROR reg_deleteallvalues(struct registry_key *key);
+WERROR reg_deletekey_recursive(TALLOC_CTX *ctx,
+                              struct registry_key *parent,
+                              const char *path);
+WERROR reg_deletesubkeys_recursive(TALLOC_CTX *ctx,
+                                  struct registry_key *parent,
+                                  const char *path);
+
+
+#endif /* _REG_API_H */
index 592b370d3b3cbc34962cb25e3831099e85d94d9b..045ad21517a5d5ca0009b8581ed44ab6014bb0c5 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "includes.h"
 #include "registry.h"
 
 #include "includes.h"
 #include "registry.h"
+#include "reg_api.h"
 #include "reg_api_util.h"
 
 /**
 #include "reg_api_util.h"
 
 /**
index de3439eb930076e6772b131f4b3fcac50834cfe5..7c2cc1ce9a3e580b319f495915b3dacec8cefd45 100644 (file)
@@ -24,6 +24,7 @@
 #include "../librpc/gen_ndr/srv_eventlog.h"
 #include "lib/eventlog/eventlog.h"
 #include "registry.h"
 #include "../librpc/gen_ndr/srv_eventlog.h"
 #include "lib/eventlog/eventlog.h"
 #include "registry.h"
+#include "registry/reg_api.h"
 #include "registry/reg_api_util.h"
 
 #undef  DBGC_CLASS
 #include "registry/reg_api_util.h"
 
 #undef  DBGC_CLASS
index ab43f6580a1fd80c1c32711e097ee0f089343e6b..fbcf76d53b866342bf822d9c2c621187c4e89f97 100644 (file)
@@ -24,6 +24,7 @@
 #include "../librpc/gen_ndr/srv_winreg.h"
 #include "registry/reg_parse_prs.h"
 #include "registry.h"
 #include "../librpc/gen_ndr/srv_winreg.h"
 #include "registry/reg_parse_prs.h"
 #include "registry.h"
+#include "registry/reg_api.h"
 #include "registry/reg_perfcount.h"
 #include "rpc_misc.h"
 
 #include "registry/reg_perfcount.h"
 #include "rpc_misc.h"
 
index 7de613efc0d1ca6c8bccf4d48bf1694809e12143..a224ab22c722db16f9491bef776d44b76e377191 100644 (file)
@@ -23,6 +23,7 @@
 #include "includes.h"
 #include "services/services.h"
 #include "registry.h"
 #include "includes.h"
 #include "services/services.h"
 #include "registry.h"
+#include "registry/reg_api.h"
 #include "registry/reg_api_util.h"
 
 struct rcinit_file_information {
 #include "registry/reg_api_util.h"
 
 struct rcinit_file_information {
index 31703223e9a13c3fe31c8e704454aa6be830c952..751972515fa08124adf0848b043fda1574c00fea 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "includes.h"
 #include "registry.h"
 
 #include "includes.h"
 #include "registry.h"
+#include "registry/reg_api.h"
 #include "registry/reg_util_token.h"
 #include "utils/net.h"
 #include "utils/net_registry_util.h"
 #include "registry/reg_util_token.h"
 #include "utils/net.h"
 #include "utils/net_registry_util.h"