diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-12-15 00:16:54 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:07:27 -0500 |
commit | d8c3428b3bb10075cec3b37adbca54db634d3b00 (patch) | |
tree | 3d75a8bab1f735e29c1e8dfae06dd2be9c970a8e /source4/lib/registry/common/reg_interface.c | |
parent | 707d1808982fa3788156999016904475eef26ffe (diff) | |
download | samba-d8c3428b3bb10075cec3b37adbca54db634d3b00.tar.gz samba-d8c3428b3bb10075cec3b37adbca54db634d3b00.tar.bz2 samba-d8c3428b3bb10075cec3b37adbca54db634d3b00.zip |
r4209: Fix several smaller bugs
Add "predef" and "set" commands in regshell
Some of the remote calls from a Windows box work now.
(This used to be commit f3e05782804fe4b4942fa966f1b9650c64bc234d)
Diffstat (limited to 'source4/lib/registry/common/reg_interface.c')
-rw-r--r-- | source4/lib/registry/common/reg_interface.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/lib/registry/common/reg_interface.c b/source4/lib/registry/common/reg_interface.c index c729945a26..f5c3598721 100644 --- a/source4/lib/registry/common/reg_interface.c +++ b/source4/lib/registry/common/reg_interface.c @@ -348,9 +348,12 @@ WERROR reg_key_get_subkey_by_name(TALLOC_CTX *mem_ctx, struct registry_key *key, for(i = 0; W_ERROR_IS_OK(error); i++) { error = reg_key_get_subkey_by_index(mem_ctx, key, i, subkey); if(W_ERROR_IS_OK(error) && !strcmp((*subkey)->name, name)) { - return error; + break; } } + + if (W_ERROR_EQUAL(error, WERR_NO_MORE_ITEMS)) + error = WERR_DEST_NOT_FOUND; } else { return WERR_NOT_SUPPORTED; } @@ -375,7 +378,7 @@ WERROR reg_key_get_value_by_name(TALLOC_CTX *mem_ctx, struct registry_key *key, } else { for(i = 0; W_ERROR_IS_OK(error); i++) { error = reg_key_get_value_by_index(mem_ctx, key, i, val); - if(W_ERROR_IS_OK(error) && StrCaseCmp((*val)->name, name)) { + if(W_ERROR_IS_OK(error) && !strcmp((*val)->name, name)) { break; } } @@ -402,7 +405,7 @@ WERROR reg_key_del(struct registry_key *parent, const char *name) return WERR_OK; } -WERROR reg_key_add_name(TALLOC_CTX *mem_ctx, struct registry_key *parent, const char *name, uint32_t access_mask, SEC_DESC *desc, struct registry_key **newkey) +WERROR reg_key_add_name(TALLOC_CTX *mem_ctx, struct registry_key *parent, const char *name, uint32_t access_mask, struct security_descriptor *desc, struct registry_key **newkey) { WERROR error; |