1 #include "reg_objects.h"
3 /* The following definitions come from registry/reg_api.c */
5 WERROR reg_openhive(TALLOC_CTX *mem_ctx, const char *hive,
7 const struct nt_user_token *token,
8 struct registry_key **pkey);
9 WERROR reg_openkey(TALLOC_CTX *mem_ctx, struct registry_key *parent,
10 const char *name, uint32 desired_access,
11 struct registry_key **pkey);
12 WERROR reg_enumkey(TALLOC_CTX *mem_ctx, struct registry_key *key,
13 uint32 idx, char **name, NTTIME *last_write_time);
14 WERROR reg_enumvalue(TALLOC_CTX *mem_ctx, struct registry_key *key,
15 uint32 idx, char **pname, struct registry_value **pval);
16 WERROR reg_queryvalue(TALLOC_CTX *mem_ctx, struct registry_key *key,
17 const char *name, struct registry_value **pval);
18 WERROR reg_queryinfokey(struct registry_key *key, uint32_t *num_subkeys,
19 uint32_t *max_subkeylen, uint32_t *max_subkeysize,
20 uint32_t *num_values, uint32_t *max_valnamelen,
21 uint32_t *max_valbufsize, uint32_t *secdescsize,
22 NTTIME *last_changed_time);
23 WERROR reg_createkey(TALLOC_CTX *ctx, struct registry_key *parent,
24 const char *subkeypath, uint32 desired_access,
25 struct registry_key **pkey,
26 enum winreg_CreateAction *paction);
27 WERROR reg_deletekey(struct registry_key *parent, const char *path);
28 WERROR reg_setvalue(struct registry_key *key, const char *name,
29 const struct registry_value *val);
30 WERROR reg_deletevalue(struct registry_key *key, const char *name);
31 WERROR reg_getkeysecurity(TALLOC_CTX *mem_ctx, struct registry_key *key,
32 struct security_descriptor **psecdesc);
33 WERROR reg_setkeysecurity(struct registry_key *key,
34 struct security_descriptor *psecdesc);
35 WERROR reg_getversion(uint32_t *version);
36 WERROR reg_restorekey(struct registry_key *key, const char *fname);
37 WERROR reg_savekey(struct registry_key *key, const char *fname);
38 WERROR reg_deleteallvalues(struct registry_key *key);
39 WERROR reg_open_path(TALLOC_CTX *mem_ctx, const char *orig_path,
40 uint32 desired_access, const struct nt_user_token *token,
41 struct registry_key **pkey);
42 WERROR reg_deletekey_recursive(TALLOC_CTX *ctx,
43 struct registry_key *parent,
45 WERROR reg_deletesubkeys_recursive(TALLOC_CTX *ctx,
46 struct registry_key *parent,
48 WERROR reg_create_path(TALLOC_CTX *mem_ctx, const char *orig_path,
49 uint32 desired_access,
50 const struct nt_user_token *token,
51 enum winreg_CreateAction *paction,
52 struct registry_key **pkey);
53 WERROR reg_delete_path(const struct nt_user_token *token,
54 const char *orig_path);
56 /* The following definitions come from registry/reg_backend_current_version.c */
59 /* The following definitions come from registry/reg_backend_db.c */
61 WERROR init_registry_key(const char *add_path);
62 WERROR init_registry_data(void);
63 WERROR regdb_init(void);
64 WERROR regdb_open( void );
65 int regdb_close( void );
66 WERROR regdb_transaction_start(void);
67 WERROR regdb_transaction_commit(void);
68 WERROR regdb_transaction_cancel(void);
69 int regdb_get_seqnum(void);
70 bool regdb_store_keys(const char *key, struct regsubkey_ctr *ctr);
71 int regdb_fetch_keys(const char *key, struct regsubkey_ctr *ctr);
72 int regdb_fetch_values(const char* key, struct regval_ctr *values);
73 bool regdb_store_values(const char *key, struct regval_ctr *values);
74 bool regdb_subkeys_need_update(struct regsubkey_ctr *subkeys);
75 bool regdb_values_need_update(struct regval_ctr *values);
77 /* The following definitions come from registry/reg_backend_hkpt_params.c */
80 /* The following definitions come from registry/reg_backend_netlogon_params.c */
83 /* The following definitions come from registry/reg_backend_perflib.c */
86 /* The following definitions come from registry/reg_backend_printing.c */
89 /* The following definitions come from registry/reg_backend_prod_options.c */
92 /* The following definitions come from registry/reg_backend_shares.c */
95 /* The following definitions come from registry/reg_backend_smbconf.c */
98 /* The following definitions come from registry/reg_backend_tcpip_params.c */
101 /* The following definitions come from registry/reg_cachehook.c */
103 WERROR reghook_cache_init(void);
104 WERROR reghook_cache_add(const char *keyname, struct registry_ops *ops);
105 struct registry_ops *reghook_cache_find(const char *keyname);
106 void reghook_dump_cache( int debuglevel );
108 /* The following definitions come from registry/reg_dispatcher.c */
110 bool store_reg_keys(struct registry_key_handle *key,
111 struct regsubkey_ctr *subkeys);
112 bool store_reg_values(struct registry_key_handle *key, struct regval_ctr *val);
113 WERROR create_reg_subkey(struct registry_key_handle *key, const char *subkey);
114 WERROR delete_reg_subkey(struct registry_key_handle *key, const char *subkey);
115 int fetch_reg_keys(struct registry_key_handle *key,
116 struct regsubkey_ctr *subkey_ctr);
117 int fetch_reg_values(struct registry_key_handle *key, struct regval_ctr *val);
118 bool regkey_access_check(struct registry_key_handle *key, uint32 requested,
120 const struct nt_user_token *token);
121 WERROR regkey_get_secdesc(TALLOC_CTX *mem_ctx, struct registry_key_handle *key,
122 struct security_descriptor **psecdesc);
123 WERROR regkey_set_secdesc(struct registry_key_handle *key,
124 struct security_descriptor *psecdesc);
125 bool reg_subkeys_need_update(struct registry_key_handle *key,
126 struct regsubkey_ctr *subkeys);
127 bool reg_values_need_update(struct registry_key_handle *key,
128 struct regval_ctr *values);
130 /* The following definitions come from registry/reg_eventlog.c */
132 bool eventlog_init_keys(void);
133 bool eventlog_add_source( const char *eventlog, const char *sourcename,
134 const char *messagefile );
136 /* The following definitions come from registry/reg_init_basic.c */
138 WERROR registry_init_common(void);
139 WERROR registry_init_basic(void);
141 /* The following definitions come from registry/reg_init_full.c */
143 WERROR registry_init_full(void);
145 /* The following definitions come from registry/reg_init_smbconf.c */
147 NTSTATUS registry_create_admin_token(TALLOC_CTX *mem_ctx,
148 NT_USER_TOKEN **ptoken);
149 WERROR registry_init_smbconf(const char *keyname);
151 /* The following definitions come from registry/reg_perfcount.c */
153 void perfcount_init_keys( void );
154 uint32 reg_perfcount_get_base_index(void);
155 uint32 reg_perfcount_get_last_counter(uint32 base_index);
156 uint32 reg_perfcount_get_last_help(uint32 last_counter);
157 uint32 reg_perfcount_get_counter_help(uint32 base_index, char **retbuf);
158 uint32 reg_perfcount_get_counter_names(uint32 base_index, char **retbuf);
159 WERROR reg_perfcount_get_hkpd(prs_struct *ps, uint32 max_buf_size, uint32 *outbuf_len, const char *object_ids);
161 /* The following definitions come from registry/reg_util.c */
163 bool reg_split_path(char *path, char **base, char **new_path);
164 bool reg_split_key(char *path, char **base, char **key);
165 char *normalize_reg_path(TALLOC_CTX *ctx, const char *keyname );
166 void normalize_dbkey(char *key);
167 char *reg_remaining_path(TALLOC_CTX *ctx, const char *key);
169 /* The following definitions come from registry/reg_util_legacy.c */
171 WERROR regkey_open_internal(TALLOC_CTX *ctx,
172 struct registry_key_handle **regkey,
174 const struct nt_user_token *token,
175 uint32 access_desired );
177 /* The following definitions come from registry/regfio.c */
179 /* The following definitions come from lib/util_reg_api.c */
181 WERROR registry_pull_value(TALLOC_CTX *mem_ctx,
182 struct registry_value **pvalue,
183 enum winreg_Type type, uint8 *data,
184 uint32 size, uint32 length);
185 WERROR registry_push_value(TALLOC_CTX *mem_ctx,
186 const struct registry_value *value,