s3-registry: only include registry headers when really needed.
authorGünther Deschner <gd@samba.org>
Thu, 1 Oct 2009 22:17:06 +0000 (00:17 +0200)
committerGünther Deschner <gd@samba.org>
Mon, 17 May 2010 23:15:38 +0000 (01:15 +0200)
Guenther

49 files changed:
libgpo/gpext/gpext.c
source3/include/includes.h
source3/include/proto.h
source3/include/reg_objects.h
source3/include/regfio.h
source3/include/registry.h [new file with mode: 0644]
source3/lib/smbconf/smbconf_reg.c
source3/lib/util_reg_api.c
source3/libads/ldap_printer.c
source3/libgpo/gpext/registry.c
source3/libgpo/gpext/scripts.c
source3/libgpo/gpo_reg.c
source3/printing/nt_printing.c
source3/registry/reg_api.c
source3/registry/reg_backend_current_version.c
source3/registry/reg_backend_db.c
source3/registry/reg_backend_hkpt_params.c
source3/registry/reg_backend_netlogon_params.c
source3/registry/reg_backend_perflib.c
source3/registry/reg_backend_printing.c
source3/registry/reg_backend_prod_options.c
source3/registry/reg_backend_shares.c
source3/registry/reg_backend_smbconf.c
source3/registry/reg_backend_tcpip_params.c
source3/registry/reg_cachehook.c
source3/registry/reg_dispatcher.c
source3/registry/reg_eventlog.c
source3/registry/reg_init_basic.c
source3/registry/reg_init_full.c
source3/registry/reg_init_smbconf.c
source3/registry/reg_objects.c
source3/registry/reg_perfcount.c
source3/registry/reg_util.c
source3/registry/reg_util_legacy.c
source3/registry/regfio.c
source3/rpc_server/srv_eventlog_nt.c
source3/rpc_server/srv_ntsvcs_nt.c
source3/rpc_server/srv_spoolss_nt.c
source3/rpc_server/srv_svcctl_nt.c
source3/rpc_server/srv_winreg_nt.c
source3/rpcclient/cmd_spoolss.c
source3/services/services_db.c
source3/smbd/server.c
source3/utils/eventlogadm.c
source3/utils/net_registry.c
source3/utils/net_registry_util.c
source3/utils/net_rpc_printer.c
source3/utils/net_rpc_registry.c
source3/utils/profiles.c

index 5465774eb1a93d155f771ceefc88157ce7953bf8..865a725c7bb7b96c3e6f67dfb4ae0312bc86dc39 100644 (file)
@@ -24,6 +24,7 @@
 #include "lib/util/dlinklist.h"
 #if _SAMBA_BUILD_ == 3
 #include "libgpo/gpo_proto.h"
+#include "registry.h"
 #endif
 
 static struct gp_extension *extensions = NULL;
index 07b31c24065f3e44bbbf865f945faedb22a6a3a9..20a52e6e5d970d59e4cc47973f507f27e46cd241 100644 (file)
@@ -656,8 +656,6 @@ struct ntlmssp_state;
 
 #include "auth.h"
 #include "ntdomain.h"
-#include "reg_objects.h"
-#include "reg_db.h"
 #include "librpc/gen_ndr/ndr_nbt.h"
 #include "librpc/rpc/dcerpc.h"
 #include "nt_printing.h"
index 8735b9aa78268edb4d038f195bbcbef3cc2afcf7..53f76545bf9c024e23bd034e77ff5d2713d0f005 100644 (file)
@@ -1303,16 +1303,6 @@ bool pull_reg_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
 bool pull_reg_multi_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
                       const DATA_BLOB *blob, const char ***a);
 
-/* The following definitions come from lib/util_reg_api.c  */
-
-WERROR registry_pull_value(TALLOC_CTX *mem_ctx,
-                          struct registry_value **pvalue,
-                          enum winreg_Type type, uint8 *data,
-                          uint32 size, uint32 length);
-WERROR registry_push_value(TALLOC_CTX *mem_ctx,
-                          const struct registry_value *value,
-                          DATA_BLOB *presult);
-
 /* The following definitions come from lib/util_seaccess.c  */
 
 void se_map_generic(uint32 *access_mask, const struct generic_mapping *mapping);
@@ -4878,217 +4868,6 @@ TDB_DATA get_printer_notify_pid_list(TDB_CONTEXT *tdb, const char *printer_name,
 void set_profile_level(int level, struct server_id src);
 bool profile_setup(struct messaging_context *msg_ctx, bool rdonly);
 
-/* The following definitions come from registry/reg_api.c  */
-
-WERROR reg_openhive(TALLOC_CTX *mem_ctx, const char *hive,
-                   uint32 desired_access,
-                   const struct nt_user_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_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_restorekey(struct registry_key *key, const char *fname);
-WERROR reg_savekey(struct registry_key *key, const char *fname);
-WERROR reg_deleteallvalues(struct registry_key *key);
-WERROR reg_open_path(TALLOC_CTX *mem_ctx, const char *orig_path,
-                    uint32 desired_access, const struct nt_user_token *token,
-                    struct registry_key **pkey);
-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);
-WERROR reg_create_path(TALLOC_CTX *mem_ctx, const char *orig_path,
-                      uint32 desired_access,
-                      const struct nt_user_token *token,
-                      enum winreg_CreateAction *paction,
-                      struct registry_key **pkey);
-WERROR reg_delete_path(const struct nt_user_token *token,
-                      const char *orig_path);
-
-/* The following definitions come from registry/reg_backend_current_version.c  */
-
-
-/* The following definitions come from registry/reg_backend_db.c  */
-
-WERROR init_registry_key(const char *add_path);
-WERROR init_registry_data(void);
-WERROR regdb_init(void);
-WERROR regdb_open( void );
-int regdb_close( void );
-WERROR regdb_transaction_start(void);
-WERROR regdb_transaction_commit(void);
-WERROR regdb_transaction_cancel(void);
-int regdb_get_seqnum(void);
-bool regdb_store_keys(const char *key, struct regsubkey_ctr *ctr);
-int regdb_fetch_keys(const char *key, struct regsubkey_ctr *ctr);
-int regdb_fetch_values(const char* key, struct regval_ctr *values);
-bool regdb_store_values(const char *key, struct regval_ctr *values);
-bool regdb_subkeys_need_update(struct regsubkey_ctr *subkeys);
-bool regdb_values_need_update(struct regval_ctr *values);
-
-/* The following definitions come from registry/reg_backend_hkpt_params.c  */
-
-
-/* The following definitions come from registry/reg_backend_netlogon_params.c  */
-
-
-/* The following definitions come from registry/reg_backend_perflib.c  */
-
-
-/* The following definitions come from registry/reg_backend_printing.c  */
-
-
-/* The following definitions come from registry/reg_backend_prod_options.c  */
-
-
-/* The following definitions come from registry/reg_backend_shares.c  */
-
-
-/* The following definitions come from registry/reg_backend_smbconf.c  */
-
-
-/* The following definitions come from registry/reg_backend_tcpip_params.c  */
-
-
-/* The following definitions come from registry/reg_cachehook.c  */
-
-WERROR reghook_cache_init(void);
-WERROR reghook_cache_add(const char *keyname, struct registry_ops *ops);
-struct registry_ops *reghook_cache_find(const char *keyname);
-void reghook_dump_cache( int debuglevel );
-
-/* The following definitions come from registry/reg_dispatcher.c  */
-
-bool store_reg_keys(struct registry_key_handle *key,
-                   struct regsubkey_ctr *subkeys);
-bool store_reg_values(struct registry_key_handle *key, struct regval_ctr *val);
-WERROR create_reg_subkey(struct registry_key_handle *key, const char *subkey);
-WERROR delete_reg_subkey(struct registry_key_handle *key, const char *subkey);
-int fetch_reg_keys(struct registry_key_handle *key,
-                  struct regsubkey_ctr *subkey_ctr);
-int fetch_reg_values(struct registry_key_handle *key, struct regval_ctr *val);
-bool regkey_access_check(struct registry_key_handle *key, uint32 requested,
-                        uint32 *granted,
-                        const struct nt_user_token *token);
-WERROR regkey_get_secdesc(TALLOC_CTX *mem_ctx, struct registry_key_handle *key,
-                         struct security_descriptor **psecdesc);
-WERROR regkey_set_secdesc(struct registry_key_handle *key,
-                         struct security_descriptor *psecdesc);
-bool reg_subkeys_need_update(struct registry_key_handle *key,
-                            struct regsubkey_ctr *subkeys);
-bool reg_values_need_update(struct registry_key_handle *key,
-                           struct regval_ctr *values);
-
-/* The following definitions come from registry/reg_eventlog.c  */
-
-bool eventlog_init_keys(void);
-bool eventlog_add_source( const char *eventlog, const char *sourcename,
-                         const char *messagefile );
-
-/* The following definitions come from registry/reg_init_basic.c  */
-
-WERROR registry_init_common(void);
-WERROR registry_init_basic(void);
-
-/* The following definitions come from registry/reg_init_full.c  */
-
-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 registry/reg_objects.c  */
-
-WERROR regsubkey_ctr_init(TALLOC_CTX *mem_ctx, struct regsubkey_ctr **ctr);
-WERROR regsubkey_ctr_reinit(struct regsubkey_ctr *ctr);
-WERROR regsubkey_ctr_set_seqnum(struct regsubkey_ctr *ctr, int seqnum);
-int regsubkey_ctr_get_seqnum(struct regsubkey_ctr *ctr);
-WERROR regsubkey_ctr_addkey( struct regsubkey_ctr *ctr, const char *keyname );
-WERROR regsubkey_ctr_delkey( struct regsubkey_ctr *ctr, const char *keyname );
-bool regsubkey_ctr_key_exists( struct regsubkey_ctr *ctr, const char *keyname );
-int regsubkey_ctr_numkeys( struct regsubkey_ctr *ctr );
-char* regsubkey_ctr_specific_key( struct regsubkey_ctr *ctr, uint32 key_index );
-int regval_ctr_numvals(struct regval_ctr *ctr);
-struct regval_blob* dup_registry_value(struct regval_blob *val);
-void free_registry_value(struct regval_blob *val);
-uint8* regval_data_p(struct regval_blob *val);
-uint32 regval_size(struct regval_blob *val);
-char* regval_name(struct regval_blob *val);
-uint32 regval_type(struct regval_blob *val);
-struct regval_blob* regval_ctr_specific_value(struct regval_ctr *ctr,
-                                             uint32 idx);
-bool regval_ctr_key_exists(struct regval_ctr *ctr, const char *value);
-struct regval_blob *regval_compose(TALLOC_CTX *ctx, const char *name,
-                                  uint16 type,
-                                  const char *data_p, size_t size);
-int regval_ctr_addvalue(struct regval_ctr *ctr, const char *name, uint16 type,
-                       const char *data_p, size_t size);
-int regval_ctr_addvalue_sz(struct regval_ctr *ctr, const char *name, const char *data);
-int regval_ctr_addvalue_multi_sz(struct regval_ctr *ctr, const char *name, const char **data);
-int regval_ctr_copyvalue(struct regval_ctr *ctr, struct regval_blob *val);
-int regval_ctr_delvalue(struct regval_ctr *ctr, const char *name);
-struct regval_blob* regval_ctr_getvalue(struct regval_ctr *ctr,
-                                       const char *name);
-uint32 regval_dword(struct regval_blob *val);
-const char *regval_sz(struct regval_blob *val);
-
-/* The following definitions come from registry/reg_perfcount.c  */
-
-void perfcount_init_keys( void );
-uint32 reg_perfcount_get_base_index(void);
-uint32 reg_perfcount_get_last_counter(uint32 base_index);
-uint32 reg_perfcount_get_last_help(uint32 last_counter);
-uint32 reg_perfcount_get_counter_help(uint32 base_index, char **retbuf);
-uint32 reg_perfcount_get_counter_names(uint32 base_index, char **retbuf);
-WERROR reg_perfcount_get_hkpd(prs_struct *ps, uint32 max_buf_size, uint32 *outbuf_len, const char *object_ids);
-
-/* The following definitions come from registry/reg_util.c  */
-
-bool reg_split_path(char *path, char **base, char **new_path);
-bool reg_split_key(char *path, char **base, char **key);
-char *normalize_reg_path(TALLOC_CTX *ctx, const char *keyname );
-void normalize_dbkey(char *key);
-char *reg_remaining_path(TALLOC_CTX *ctx, const char *key);
-
-/* The following definitions come from registry/reg_util_legacy.c  */
-
-WERROR regkey_open_internal(TALLOC_CTX *ctx,
-                           struct registry_key_handle **regkey,
-                           const char *path,
-                           const struct nt_user_token *token,
-                           uint32 access_desired );
-
-/* The following definitions come from registry/regfio.c  */
-
 
 /* The following definitions come from rpc_client/cli_lsarpc.c  */
 
index 8d220ebdf5823e0c27885894809fb2ee43d82649..761bb495962ee71c01e6dcc7da495ff7f2c77abf 100644 (file)
@@ -167,4 +167,40 @@ struct registry_key {
        struct nt_user_token *token;
 };
 
+/* The following definitions come from registry/reg_objects.c  */
+
+WERROR regsubkey_ctr_init(TALLOC_CTX *mem_ctx, struct regsubkey_ctr **ctr);
+WERROR regsubkey_ctr_reinit(struct regsubkey_ctr *ctr);
+WERROR regsubkey_ctr_set_seqnum(struct regsubkey_ctr *ctr, int seqnum);
+int regsubkey_ctr_get_seqnum(struct regsubkey_ctr *ctr);
+WERROR regsubkey_ctr_addkey( struct regsubkey_ctr *ctr, const char *keyname );
+WERROR regsubkey_ctr_delkey( struct regsubkey_ctr *ctr, const char *keyname );
+bool regsubkey_ctr_key_exists( struct regsubkey_ctr *ctr, const char *keyname );
+int regsubkey_ctr_numkeys( struct regsubkey_ctr *ctr );
+char* regsubkey_ctr_specific_key( struct regsubkey_ctr *ctr, uint32 key_index );
+int regval_ctr_numvals(struct regval_ctr *ctr);
+struct regval_blob* dup_registry_value(struct regval_blob *val);
+void free_registry_value(struct regval_blob *val);
+uint8* regval_data_p(struct regval_blob *val);
+uint32 regval_size(struct regval_blob *val);
+char* regval_name(struct regval_blob *val);
+uint32 regval_type(struct regval_blob *val);
+struct regval_blob* regval_ctr_specific_value(struct regval_ctr *ctr,
+                                             uint32 idx);
+bool regval_ctr_key_exists(struct regval_ctr *ctr, const char *value);
+struct regval_blob *regval_compose(TALLOC_CTX *ctx, const char *name,
+                                  uint16 type,
+                                  const char *data_p, size_t size);
+int regval_ctr_addvalue(struct regval_ctr *ctr, const char *name, uint16 type,
+                       const char *data_p, size_t size);
+int regval_ctr_addvalue_sz(struct regval_ctr *ctr, const char *name, const char *data);
+int regval_ctr_addvalue_multi_sz(struct regval_ctr *ctr, const char *name, const char **data);
+int regval_ctr_copyvalue(struct regval_ctr *ctr, struct regval_blob *val);
+int regval_ctr_delvalue(struct regval_ctr *ctr, const char *name);
+struct regval_blob* regval_ctr_getvalue(struct regval_ctr *ctr,
+                                       const char *name);
+uint32 regval_dword(struct regval_blob *val);
+const char *regval_sz(struct regval_blob *val);
+
+
 #endif /* _REG_OBJECTS_H */
index 58bfe80c91d98a62101527c94cb5556d26fdee4c..61d74d7f2af7e65b59473f3771e0862f40116d30 100644 (file)
@@ -27,6 +27,8 @@
 #ifndef _REGFIO_H
 #define _REGFIO_H
 
+struct regsubkey_ctr;
+
 /* Macros */
  
 #define REGF_BLOCKSIZE         0x1000
diff --git a/source3/include/registry.h b/source3/include/registry.h
new file mode 100644 (file)
index 0000000..5644819
--- /dev/null
@@ -0,0 +1,188 @@
+#include "reg_objects.h"
+
+/* The following definitions come from registry/reg_api.c  */
+
+WERROR reg_openhive(TALLOC_CTX *mem_ctx, const char *hive,
+                   uint32 desired_access,
+                   const struct nt_user_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_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_restorekey(struct registry_key *key, const char *fname);
+WERROR reg_savekey(struct registry_key *key, const char *fname);
+WERROR reg_deleteallvalues(struct registry_key *key);
+WERROR reg_open_path(TALLOC_CTX *mem_ctx, const char *orig_path,
+                    uint32 desired_access, const struct nt_user_token *token,
+                    struct registry_key **pkey);
+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);
+WERROR reg_create_path(TALLOC_CTX *mem_ctx, const char *orig_path,
+                      uint32 desired_access,
+                      const struct nt_user_token *token,
+                      enum winreg_CreateAction *paction,
+                      struct registry_key **pkey);
+WERROR reg_delete_path(const struct nt_user_token *token,
+                      const char *orig_path);
+
+/* The following definitions come from registry/reg_backend_current_version.c  */
+
+
+/* The following definitions come from registry/reg_backend_db.c  */
+
+WERROR init_registry_key(const char *add_path);
+WERROR init_registry_data(void);
+WERROR regdb_init(void);
+WERROR regdb_open( void );
+int regdb_close( void );
+WERROR regdb_transaction_start(void);
+WERROR regdb_transaction_commit(void);
+WERROR regdb_transaction_cancel(void);
+int regdb_get_seqnum(void);
+bool regdb_store_keys(const char *key, struct regsubkey_ctr *ctr);
+int regdb_fetch_keys(const char *key, struct regsubkey_ctr *ctr);
+int regdb_fetch_values(const char* key, struct regval_ctr *values);
+bool regdb_store_values(const char *key, struct regval_ctr *values);
+bool regdb_subkeys_need_update(struct regsubkey_ctr *subkeys);
+bool regdb_values_need_update(struct regval_ctr *values);
+
+/* The following definitions come from registry/reg_backend_hkpt_params.c  */
+
+
+/* The following definitions come from registry/reg_backend_netlogon_params.c  */
+
+
+/* The following definitions come from registry/reg_backend_perflib.c  */
+
+
+/* The following definitions come from registry/reg_backend_printing.c  */
+
+
+/* The following definitions come from registry/reg_backend_prod_options.c  */
+
+
+/* The following definitions come from registry/reg_backend_shares.c  */
+
+
+/* The following definitions come from registry/reg_backend_smbconf.c  */
+
+
+/* The following definitions come from registry/reg_backend_tcpip_params.c  */
+
+
+/* The following definitions come from registry/reg_cachehook.c  */
+
+WERROR reghook_cache_init(void);
+WERROR reghook_cache_add(const char *keyname, struct registry_ops *ops);
+struct registry_ops *reghook_cache_find(const char *keyname);
+void reghook_dump_cache( int debuglevel );
+
+/* The following definitions come from registry/reg_dispatcher.c  */
+
+bool store_reg_keys(struct registry_key_handle *key,
+                   struct regsubkey_ctr *subkeys);
+bool store_reg_values(struct registry_key_handle *key, struct regval_ctr *val);
+WERROR create_reg_subkey(struct registry_key_handle *key, const char *subkey);
+WERROR delete_reg_subkey(struct registry_key_handle *key, const char *subkey);
+int fetch_reg_keys(struct registry_key_handle *key,
+                  struct regsubkey_ctr *subkey_ctr);
+int fetch_reg_values(struct registry_key_handle *key, struct regval_ctr *val);
+bool regkey_access_check(struct registry_key_handle *key, uint32 requested,
+                        uint32 *granted,
+                        const struct nt_user_token *token);
+WERROR regkey_get_secdesc(TALLOC_CTX *mem_ctx, struct registry_key_handle *key,
+                         struct security_descriptor **psecdesc);
+WERROR regkey_set_secdesc(struct registry_key_handle *key,
+                         struct security_descriptor *psecdesc);
+bool reg_subkeys_need_update(struct registry_key_handle *key,
+                            struct regsubkey_ctr *subkeys);
+bool reg_values_need_update(struct registry_key_handle *key,
+                           struct regval_ctr *values);
+
+/* The following definitions come from registry/reg_eventlog.c  */
+
+bool eventlog_init_keys(void);
+bool eventlog_add_source( const char *eventlog, const char *sourcename,
+                         const char *messagefile );
+
+/* The following definitions come from registry/reg_init_basic.c  */
+
+WERROR registry_init_common(void);
+WERROR registry_init_basic(void);
+
+/* The following definitions come from registry/reg_init_full.c  */
+
+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 registry/reg_perfcount.c  */
+
+void perfcount_init_keys( void );
+uint32 reg_perfcount_get_base_index(void);
+uint32 reg_perfcount_get_last_counter(uint32 base_index);
+uint32 reg_perfcount_get_last_help(uint32 last_counter);
+uint32 reg_perfcount_get_counter_help(uint32 base_index, char **retbuf);
+uint32 reg_perfcount_get_counter_names(uint32 base_index, char **retbuf);
+WERROR reg_perfcount_get_hkpd(prs_struct *ps, uint32 max_buf_size, uint32 *outbuf_len, const char *object_ids);
+
+/* The following definitions come from registry/reg_util.c  */
+
+bool reg_split_path(char *path, char **base, char **new_path);
+bool reg_split_key(char *path, char **base, char **key);
+char *normalize_reg_path(TALLOC_CTX *ctx, const char *keyname );
+void normalize_dbkey(char *key);
+char *reg_remaining_path(TALLOC_CTX *ctx, const char *key);
+
+/* The following definitions come from registry/reg_util_legacy.c  */
+
+WERROR regkey_open_internal(TALLOC_CTX *ctx,
+                           struct registry_key_handle **regkey,
+                           const char *path,
+                           const struct nt_user_token *token,
+                           uint32 access_desired );
+
+/* The following definitions come from registry/regfio.c  */
+
+/* The following definitions come from lib/util_reg_api.c  */
+
+WERROR registry_pull_value(TALLOC_CTX *mem_ctx,
+                          struct registry_value **pvalue,
+                          enum winreg_Type type, uint8 *data,
+                          uint32 size, uint32 length);
+WERROR registry_push_value(TALLOC_CTX *mem_ctx,
+                          const struct registry_value *value,
+                          DATA_BLOB *presult);
+
index aa6c60f14cd5e7543a1ac0c462048a32b3d9410a..96b5f1ee24bdd422fce18306fc139f20637cb42b 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "includes.h"
 #include "lib/smbconf/smbconf_private.h"
+#include "registry.h"
 
 #define INCLUDES_VALNAME "includes"
 
index 65a74b845d7a05cae68d6757045ef118ad103742..5f9eb85323cbe93f2fae47daf3c1559103e5d82f 100644 (file)
@@ -18,6 +18,7 @@
  */
 
 #include "includes.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index d5290b23a9cf954975f34b461c5b2004debe16d1..6f49a57bb0c0841a7876493269e2f2c67494b6d3 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "includes.h"
 #include "../librpc/gen_ndr/cli_spoolss.h"
+#include "registry.h"
 
 #ifdef HAVE_ADS
 
index d7018556d85f1cd2ed7f983d08ca9392e4e27d57..57840a4c06d5aa364dc85e2838b7c0b0c6998fd2 100644 (file)
@@ -21,6 +21,7 @@
 #include "../libgpo/gpo_ini.h"
 #include "../libgpo/gpo.h"
 #include "libgpo/gpo_proto.h"
+#include "registry.h"
 
 #define GP_EXT_NAME "registry"
 
index 3ec580530991cb8cd28b396bcb0cb0d2276c368e..f03dff4e348c9f491bab2877dde969aaad134826 100644 (file)
@@ -21,6 +21,7 @@
 #include "../libgpo/gpo_ini.h"
 #include "../libgpo/gpo.h"
 #include "libgpo/gpo_proto.h"
+#include "registry.h"
 
 #define GP_EXT_NAME "scripts"
 
index f191eb8711b8ec79df78e6d564bb34db11642915..b4a9e291778b01049d8293913c33a25695c324e5 100644 (file)
@@ -20,6 +20,7 @@
 #include "includes.h"
 #include "../libgpo/gpo.h"
 #include "libgpo/gpo_proto.h"
+#include "registry.h"
 
 
 /****************************************************************
index 76f112f818ccaaf2eb6a1dc19f6e2e74f6609fca..8e8695c20e6583c81de865c347686ada89012c8e 100644 (file)
@@ -22,6 +22,7 @@
 #include "includes.h"
 #include "librpc/gen_ndr/messaging.h"
 #include "printing/pcap.h"
+#include "registry.h"
 
 static TDB_CONTEXT *tdb_forms; /* used for forms files */
 static TDB_CONTEXT *tdb_drivers; /* used for driver files */
index 6589a61470b44ba3d241e6902247fa88dffc1c78..2e16b443f0bd4bd0f882298c89f795305ff46141 100644 (file)
@@ -63,6 +63,7 @@
  */
 
 #include "includes.h"
+#include "registry.h"
 #include "regfio.h"
 
 #undef DBGC_CLASS
index 386c580965ddfc495ea63688070fc7500a7d32ba..7327dd92042095c65f8514326e4cd9fb393dce59 100644 (file)
@@ -25,6 +25,7 @@
  */
 
 #include "includes.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index 90a6f6411590e52daa2120b9320567f9f33f53d9..89a6e95a399cad6c8ea0c4ee94ce6d30d53bf52b 100644 (file)
@@ -21,6 +21,8 @@
 /* Implementation of internal registry database functions. */
 
 #include "includes.h"
+#include "registry.h"
+#include "reg_db.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index ca37b5952265ae3c7d9b4857e78ee3f10aa65c36..479d9366b027c96838e45868cd0796c2ea34bd4f 100644 (file)
@@ -25,6 +25,7 @@
  */
 
 #include "includes.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index 6fc87efb1d3cbedf6213ef803cfd4a7cdc9014cd..1d5ac719eb63a4020206cf4279573dbf2e290605 100644 (file)
@@ -25,6 +25,7 @@
  */
 
 #include "includes.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index 54e6cfe92225465dbc4b0982f799b4ee634f02a9..db8e7a3c5db4370d42567d73424a90aea074e090 100644 (file)
@@ -25,6 +25,7 @@
  */
 
 #include "includes.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index e90c708edf00ed4c03fe72d02db3faf61134ff74..e4a90c2e4c1d318031fd6872137abb83ad382ca1 100644 (file)
@@ -20,6 +20,7 @@
 /* Implementation of registry virtual views for printing information */
 
 #include "includes.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index 786bc99eb1a240330e11badfed8bb29c72a702ad..764d98f6d63f3c54b5941740a05d67d0426cfa04 100644 (file)
@@ -25,6 +25,7 @@
  */
 
 #include "includes.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index 143e79fc9b8662c09210a9f2b07162e88f4f768e..e211e439fd532323261edb1b8566bffd681950cb 100644 (file)
@@ -20,6 +20,7 @@
 /* Implementation of registry virtual views for printing information */
 
 #include "includes.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index 15993438a9456957aafef772d9a0b058cdc3bbbf..20868d169609d33906703cbc362c53423405397e 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 #include "includes.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index fbad0436b61e030b43c816a9f1a53a1669ea967f..02bf59c23c69069dcf42b699a25bb0d50bfa749a 100644 (file)
@@ -25,6 +25,7 @@
  */
 
 #include "includes.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index 43eae7d61c7a37514338f7a4408300d6301bd1a2..6812ecbd7cf6962a1a0df957e2c496591e6129ca 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "includes.h"
 #include "adt_tree.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index 0c3ceecb6cff0a83303227014d6f6249f7df4b1b..874977d62210627fee262e0ea21e9fe60a11edc8 100644 (file)
@@ -24,6 +24,7 @@
  */
 
 #include "includes.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index 7a277e2032b1d670dc43a28900e540db5e891071..acab5d0848b7290935ffd645d8f9c53acce6560f 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #include "includes.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index eab4ca7f9d62b3501401d9a46493f33e48f3ab77..4958df22a059e32d2d0a2aab2c1a3ac5645f5278 100644 (file)
@@ -18,6 +18,7 @@
  */
 
 #include "includes.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index d05a74ef35227b5d51485a7cb06ed4f1d8e21569..fd4026dc96032f66cca8508510351f9b02c7b144 100644 (file)
@@ -21,6 +21,7 @@
 /* Initialize the registry with all available backends. */
 
 #include "includes.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index 28c4187784dbd5619f3fb971dd7606fbb865bd56..632ac3b53470905ad34bb86f01eb9b72e949e689 100644 (file)
@@ -18,6 +18,7 @@
  */
 
 #include "includes.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index a07e36157ef7402d9dfa19d5036f8fbc4a00738c..5bc7cd705b6c5b89a4414b5e1b11dc0b63f4e0f2 100644 (file)
@@ -20,6 +20,7 @@
 /* Implementation of registry frontend view functions. */
 
 #include "includes.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index 57d92ff1327ad2ef978d692d1c150e5e48752c05..19ff62da30d5842970627a2b8d30721007ca25a7 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "includes.h"
 #include "../librpc/gen_ndr/perfcount.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index fd7652116f91d5b5d3c6ba030ebebb2a9cfe2549..483523f100163e97c085d34e8346de813a42c26a 100644 (file)
@@ -20,6 +20,7 @@
 /* Implementation of registry frontend view functions. */
 
 #include "includes.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index 50bc8b92cc758f462cb97a529916b00fab161fac..f8f3764c883370afbb750d96398c6ed3fb9f6960 100644 (file)
@@ -20,6 +20,7 @@
 /* Implementation of registry frontend view functions. */
 
 #include "includes.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index fa7dc7dfe9c2a92ca2750c885df772d067090776..c6194c4061e197296b2f12149769e98f6ee618ce 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "includes.h"
 #include "regfio.h"
+#include "reg_objects.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index 3b109558f07bbb31a92a9ec0c255ea6669ee5d8a..58b181c038e9799415d6ad44e9bed816e6fe5bb4 100644 (file)
@@ -23,6 +23,7 @@
 #include "includes.h"
 #include "../librpc/gen_ndr/srv_eventlog.h"
 #include "lib/eventlog/eventlog.h"
+#include "registry.h"
 
 #undef  DBGC_CLASS
 #define DBGC_CLASS DBGC_RPC_SRV
index c9f7b222914ee3a19e39b700e1835f0a3f309c4b..cf02e44a21c702dff9947e2f28460625fc16d482 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "includes.h"
 #include "../librpc/gen_ndr/srv_ntsvcs.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_RPC_SRV
index 3a71e7cef33e928e3f1e6b2b5daaca25d30f4381..823b051e92e7f61a8812cc14922635f20eae57d9 100644 (file)
@@ -30,6 +30,7 @@
 #include "../librpc/gen_ndr/srv_spoolss.h"
 #include "../librpc/gen_ndr/cli_spoolss.h"
 #include "librpc/gen_ndr/messaging.h"
+#include "registry.h"
 
 /* macros stolen from s4 spoolss server */
 #define SPOOLSS_BUFFER_UNION(fn,ic,info,level) \
index e4ddcd35bf668b894478f90cd95b10d3d1ae414a..023d2130bf41cd7bed0a7d3666bdf613f4d88c51 100644 (file)
@@ -25,6 +25,7 @@
 #include "includes.h"
 #include "../librpc/gen_ndr/srv_svcctl.h"
 #include "services.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_RPC_SRV
index e64118b744621e5cb39a62c76513adc4b20b32c0..9f8c75acea17130afc9bf80f17eb10dd5e512944 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "includes.h"
 #include "../librpc/gen_ndr/srv_winreg.h"
+#include "registry.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_RPC_SRV
index 6b62bdeb526fc78d90752448b3451245d38ee78f..9ab02b5a974eafc47d442a2840b12507e3d0d9e6 100644 (file)
@@ -25,6 +25,7 @@
 #include "includes.h"
 #include "rpcclient.h"
 #include "../librpc/gen_ndr/cli_spoolss.h"
+#include "registry.h"
 
 #define RPCCLIENT_PRINTERNAME(_printername, _cli, _arg) \
 { \
index 0241097a2c89ae5734ee9ae82565275acbc7888d..9b28afecd7100d0fc457428d2f88f91251b4c7c1 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "includes.h"
 #include "services.h"
+#include "registry.h"
 
 struct rcinit_file_information {
        char *description;
index 2c207507c2d4ce37e0885d5e880d9167504654d0..fcfabcd06f07498b583c3aab793d6f841a21184b 100644 (file)
@@ -24,6 +24,7 @@
 #include "includes.h"
 #include "smbd/globals.h"
 #include "librpc/gen_ndr/messaging.h"
+#include "registry.h"
 
 static_decl_rpc;
 
index 73d851db6f1459819cc4b8dcd2eabc48a7a7bb3e..63329dea223bb7f6579c22fceb20f8c3baddfa1e 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "includes.h"
 #include "lib/eventlog/eventlog.h"
+#include "registry.h"
 
 #undef  DBGC_CLASS
 #define DBGC_CLASS DBGC_UTIL_EVENTLOG
index ae9cdde2fbd968a0f67571c8a27dff0ca5c88125..0c3aea0f4af95838cfb8b13409887fe5a3113db6 100644 (file)
  */
 
 #include "includes.h"
+#include "registry.h"
 #include "utils/net.h"
 #include "utils/net_registry_util.h"
 #include "include/g_lock.h"
 
-
 /*
  *
  * Helper functions
index 0b0f6172229c19c37b3da3d8b2847d1fbfdaf454..5bb289335e5d6a035608d253b9cb42a02a6d2480 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "includes.h"
+#include "registry.h"
 #include "utils/net_registry_util.h"
 #include "utils/net.h"
 
index 9d38fca77e962ffda8998baa1079dc6c1d59d6e8..be926864a7bddc116feed265900a6d44ef842d3a 100644 (file)
@@ -19,6 +19,7 @@
 #include "includes.h"
 #include "utils/net.h"
 #include "../librpc/gen_ndr/cli_spoolss.h"
+#include "registry.h"
 
 /* support itanium as well */
 static const struct print_architecture_table_node archi_table[]= {
index 2400af4601ea47bfa650f868ad0dc87d25773567..6d87bd4e1b3fdad40337086509dd1112a3f57466 100644 (file)
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
  
 #include "includes.h"
+#include "registry.h"
 #include "utils/net.h"
 #include "utils/net_registry_util.h"
 #include "regfio.h"
-#include "reg_objects.h"
 #include "../librpc/gen_ndr/cli_winreg.h"
 
 /*******************************************************************
index 0dc9aca8765dd2be5c80c0e44cdf9f528ff03878..499f7bd7589c90fce7def66392e79671b7e1df2c 100644 (file)
@@ -20,6 +20,7 @@
 */
                                   
 #include "includes.h"
+#include "reg_objects.h"
 #include "regfio.h"
 
 /* GLOBAL VARIABLES */