diff options
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_api.c | 21 | ||||
-rw-r--r-- | source3/registry/reg_dispatcher.c | 29 | ||||
-rw-r--r-- | source3/registry/reg_util_legacy.c | 9 |
3 files changed, 34 insertions, 25 deletions
diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c index e81c11747b..6dfda13e33 100644 --- a/source3/registry/reg_api.c +++ b/source3/registry/reg_api.c @@ -113,7 +113,7 @@ static WERROR fill_subkey_cache(struct registry_key *key) return WERR_OK; } -static int regkey_destructor(REGISTRY_KEY *key) +static int regkey_destructor(struct registry_key_handle *key) { return regdb_close(); } @@ -127,7 +127,7 @@ static WERROR regkey_open_onelevel(TALLOC_CTX *mem_ctx, { WERROR result = WERR_OK; struct registry_key *regkey; - REGISTRY_KEY *key; + struct registry_key_handle *key; struct regsubkey_ctr *subkeys = NULL; DEBUG(7,("regkey_open_onelevel: name = [%s]\n", name)); @@ -136,7 +136,8 @@ static WERROR regkey_open_onelevel(TALLOC_CTX *mem_ctx, if (!(regkey = TALLOC_ZERO_P(mem_ctx, struct registry_key)) || !(regkey->token = dup_nt_token(regkey, token)) || - !(regkey->key = TALLOC_ZERO_P(regkey, REGISTRY_KEY))) { + !(regkey->key = TALLOC_ZERO_P(regkey, struct registry_key_handle))) + { result = WERR_NOMEM; goto done; } @@ -709,14 +710,14 @@ static WERROR reg_load_tree(REGF_FILE *regfile, const char *topkeypath, REGF_NK_REC *key) { REGF_NK_REC *subkey; - REGISTRY_KEY registry_key; + struct registry_key_handle registry_key; struct regval_ctr *values; struct regsubkey_ctr *subkeys; int i; char *path = NULL; WERROR result = WERR_OK; - /* initialize the REGISTRY_KEY structure */ + /* initialize the struct registry_key_handle structure */ registry_key.ops = reghook_cache_find(topkeypath); if (!registry_key.ops) { @@ -799,7 +800,8 @@ static WERROR reg_load_tree(REGF_FILE *regfile, const char *topkeypath, /******************************************************************* ********************************************************************/ -static WERROR restore_registry_key(REGISTRY_KEY *krecord, const char *fname) +static WERROR restore_registry_key(struct registry_key_handle *krecord, + const char *fname) { REGF_FILE *regfile; REGF_NK_REC *rootkey; @@ -850,7 +852,7 @@ static WERROR reg_write_tree(REGF_FILE *regfile, const char *keypath, char *keyname, *parentpath; char *subkeypath = NULL; char *subkeyname; - REGISTRY_KEY registry_key; + struct registry_key_handle registry_key; WERROR result = WERR_OK; SEC_DESC *sec_desc = NULL; @@ -876,7 +878,7 @@ static WERROR reg_write_tree(REGF_FILE *regfile, const char *keypath, keyname = parentpath; } - /* we need a REGISTRY_KEY object here to enumerate subkeys and values */ + /* we need a registry_key_handle object here to enumerate subkeys and values */ ZERO_STRUCT(registry_key); @@ -942,7 +944,8 @@ done: return result; } -static WERROR backup_registry_key(REGISTRY_KEY *krecord, const char *fname) +static WERROR backup_registry_key(struct registry_key_handle *krecord, + const char *fname) { REGF_FILE *regfile; WERROR result; diff --git a/source3/registry/reg_dispatcher.c b/source3/registry/reg_dispatcher.c index 8b7987507a..cc6d95f738 100644 --- a/source3/registry/reg_dispatcher.c +++ b/source3/registry/reg_dispatcher.c @@ -80,7 +80,8 @@ static WERROR construct_registry_sd(TALLOC_CTX *ctx, SEC_DESC **psd) High level wrapper function for storing registry subkeys ***********************************************************************/ -bool store_reg_keys( REGISTRY_KEY *key, struct regsubkey_ctr *subkeys ) +bool store_reg_keys(struct registry_key_handle *key, + struct regsubkey_ctr *subkeys) { if (key->ops && key->ops->store_subkeys) return key->ops->store_subkeys(key->name, subkeys); @@ -92,7 +93,7 @@ bool store_reg_keys( REGISTRY_KEY *key, struct regsubkey_ctr *subkeys ) High level wrapper function for storing registry values ***********************************************************************/ -bool store_reg_values(REGISTRY_KEY *key, struct regval_ctr *val) +bool store_reg_values(struct registry_key_handle *key, struct regval_ctr *val) { if (key->ops && key->ops->store_values) return key->ops->store_values(key->name, val); @@ -100,7 +101,7 @@ bool store_reg_values(REGISTRY_KEY *key, struct regval_ctr *val) return false; } -WERROR create_reg_subkey(REGISTRY_KEY *key, const char *subkey) +WERROR create_reg_subkey(struct registry_key_handle *key, const char *subkey) { if (key->ops && key->ops->create_subkey) { return key->ops->create_subkey(key->name, subkey); @@ -109,7 +110,7 @@ WERROR create_reg_subkey(REGISTRY_KEY *key, const char *subkey) return WERR_NOT_SUPPORTED; } -WERROR delete_reg_subkey(REGISTRY_KEY *key, const char *subkey) +WERROR delete_reg_subkey(struct registry_key_handle *key, const char *subkey) { if (key->ops && key->ops->delete_subkey) { return key->ops->delete_subkey(key->name, subkey); @@ -123,7 +124,8 @@ WERROR delete_reg_subkey(REGISTRY_KEY *key, const char *subkey) Initialize the TALLOC_CTX if necessary ***********************************************************************/ -int fetch_reg_keys( REGISTRY_KEY *key, struct regsubkey_ctr *subkey_ctr ) +int fetch_reg_keys(struct registry_key_handle *key, + struct regsubkey_ctr *subkey_ctr) { int result = -1; @@ -137,7 +139,7 @@ int fetch_reg_keys( REGISTRY_KEY *key, struct regsubkey_ctr *subkey_ctr ) High level wrapper function for enumerating registry values ***********************************************************************/ -int fetch_reg_values(REGISTRY_KEY *key, struct regval_ctr *val) +int fetch_reg_values(struct registry_key_handle *key, struct regval_ctr *val) { int result = -1; @@ -155,8 +157,9 @@ int fetch_reg_values(REGISTRY_KEY *key, struct regval_ctr *val) underlying registry backend ***********************************************************************/ -bool regkey_access_check( REGISTRY_KEY *key, uint32 requested, uint32 *granted, - const struct nt_user_token *token ) +bool regkey_access_check(struct registry_key_handle *key, uint32 requested, + uint32 *granted, + const struct nt_user_token *token ) { SEC_DESC *sec_desc; NTSTATUS status; @@ -187,7 +190,7 @@ bool regkey_access_check( REGISTRY_KEY *key, uint32 requested, uint32 *granted, return NT_STATUS_IS_OK(status); } -WERROR regkey_get_secdesc(TALLOC_CTX *mem_ctx, REGISTRY_KEY *key, +WERROR regkey_get_secdesc(TALLOC_CTX *mem_ctx, struct registry_key_handle *key, struct security_descriptor **psecdesc) { struct security_descriptor *secdesc; @@ -209,7 +212,7 @@ WERROR regkey_get_secdesc(TALLOC_CTX *mem_ctx, REGISTRY_KEY *key, return WERR_OK; } -WERROR regkey_set_secdesc(REGISTRY_KEY *key, +WERROR regkey_set_secdesc(struct registry_key_handle *key, struct security_descriptor *psecdesc) { if (key->ops && key->ops->set_secdesc) { @@ -223,7 +226,8 @@ WERROR regkey_set_secdesc(REGISTRY_KEY *key, * Check whether the in-memory version of the subkyes of a * registry key needs update from disk. */ -bool reg_subkeys_need_update(REGISTRY_KEY *key, struct regsubkey_ctr *subkeys) +bool reg_subkeys_need_update(struct registry_key_handle *key, + struct regsubkey_ctr *subkeys) { if (key->ops && key->ops->subkeys_need_update) { @@ -237,7 +241,8 @@ bool reg_subkeys_need_update(REGISTRY_KEY *key, struct regsubkey_ctr *subkeys) * Check whether the in-memory version of the values of a * registry key needs update from disk. */ -bool reg_values_need_update(REGISTRY_KEY *key, struct regval_ctr *values) +bool reg_values_need_update(struct registry_key_handle *key, + struct regval_ctr *values) { if (key->ops && key->ops->values_need_update) { diff --git a/source3/registry/reg_util_legacy.c b/source3/registry/reg_util_legacy.c index 3e68025ae9..c99e66a408 100644 --- a/source3/registry/reg_util_legacy.c +++ b/source3/registry/reg_util_legacy.c @@ -28,10 +28,11 @@ * legacy open key function that should be replaced by uses of * reg_open_path */ -WERROR regkey_open_internal( TALLOC_CTX *ctx, REGISTRY_KEY **regkey, - const char *path, - const struct nt_user_token *token, - uint32 access_desired ) +WERROR regkey_open_internal(TALLOC_CTX *ctx, + struct registry_key_handle **regkey, + const char *path, + const struct nt_user_token *token, + uint32 access_desired ) { struct registry_key *key; WERROR err; |