diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-12-14 20:49:18 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:07:26 -0500 |
commit | 1a340869c43f9ce741e8a4bd28ea01ec63301df5 (patch) | |
tree | cd005ea4f160b42c8c38b7a9112b87c93ee0ced3 /source4/lib/registry/tools/regpatch.c | |
parent | 75f02f9d4daf4a16b408ce145f841f11d4b0ca67 (diff) | |
download | samba-1a340869c43f9ce741e8a4bd28ea01ec63301df5.tar.gz samba-1a340869c43f9ce741e8a4bd28ea01ec63301df5.tar.bz2 samba-1a340869c43f9ce741e8a4bd28ea01ec63301df5.zip |
r4204: Arguments to reg_del_key more like the RPC for more efficient usage
Fix small bug in regpatch
Fix segfault in regshell cmdline completion
Implement set_value and del_value in ldb backend
(This used to be commit 8e2aa58abeafa78afe7dafb9723f5f365e756527)
Diffstat (limited to 'source4/lib/registry/tools/regpatch.c')
-rw-r--r-- | source4/lib/registry/tools/regpatch.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/source4/lib/registry/tools/regpatch.c b/source4/lib/registry/tools/regpatch.c index 18589a9285..600c1f60e7 100644 --- a/source4/lib/registry/tools/regpatch.c +++ b/source4/lib/registry/tools/regpatch.c @@ -686,13 +686,7 @@ static int nt_apply_reg_command_file(struct registry_context *r, const char *cmd /* If we found it, apply the other bits, else create such a key */ if (W_ERROR_EQUAL(error, WERR_DEST_NOT_FOUND)) { - if(W_ERROR_IS_OK(reg_key_add_name_recursive_abs(r, cmd->key))) { - error = reg_open_key_abs(mem_ctx, r, cmd->key, &tmp); - if(!W_ERROR_IS_OK(error)) { - DEBUG(0, ("Error finding new key '%s' after it has been added\n", cmd->key)); - continue; - } - } else { + if(!W_ERROR_IS_OK(reg_key_add_abs(mem_ctx, r, cmd->key, 0, NULL, &tmp))) { DEBUG(0, ("Error adding new key '%s'\n", cmd->key)); continue; } @@ -730,13 +724,7 @@ static int nt_apply_reg_command_file(struct registry_context *r, const char *cmd * Find the key if it exists, and delete it ... */ - error = reg_open_key_abs(mem_ctx, r, cmd->key, &tmp); - if(!W_ERROR_IS_OK(error)) { - DEBUG(0, ("Unable to open key '%s'\n", cmd->key)); - continue; - } - - error = reg_key_del_recursive(tmp); + error = reg_key_del_abs(r, cmd->key); if(!W_ERROR_IS_OK(error)) { DEBUG(0, ("Unable to delete key '%s'\n", cmd->key)); continue; |