summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorWilco Baan Hofman <wilco@baanhofman.nl>2010-03-28 16:18:46 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-03-29 18:43:59 +0200
commitf8e67f198ad6e42f7563390012f30fffe43b92f7 (patch)
tree68786e323d8beb25abaab2624414db97d83d3602 /source4/lib
parentd90f1a7146385328dfd8e5245e7b1f83eb46e7e1 (diff)
downloadsamba-f8e67f198ad6e42f7563390012f30fffe43b92f7.tar.gz
samba-f8e67f198ad6e42f7563390012f30fffe43b92f7.tar.bz2
samba-f8e67f198ad6e42f7563390012f30fffe43b92f7.zip
Revert "s4:registry - "util" - make "reg_key_add_abs" consistent with "reg_key_del_abs""
This reverts commit 9d8592978e28c492d971a3b5a4c0133febc149ea. Conflicts: source4/lib/registry/util.c Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/registry/util.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source4/lib/registry/util.c b/source4/lib/registry/util.c
index 56d215cab7..5bc0a63950 100644
--- a/source4/lib/registry/util.c
+++ b/source4/lib/registry/util.c
@@ -272,13 +272,16 @@ WERROR reg_key_add_abs(TALLOC_CTX *mem_ctx, struct registry_context *ctx,
}
error = get_abs_parent(mem_ctx, ctx, path, &parent, &n);
- if (W_ERROR_IS_OK(error)) {
- error = reg_key_add_name(mem_ctx, parent, n, NULL, sec_desc,
- result);
-
- talloc_free(parent);
- talloc_free(n);
+ if (!W_ERROR_IS_OK(error)) {
+ DEBUG(2, ("Opening parent of %s failed with %s\n", path,
+ win_errstr(error)));
+ return error;
}
+ error = reg_key_add_name(mem_ctx, parent, n, NULL, sec_desc, result);
+
+ talloc_free(parent);
+ talloc_free(n);
+
return error;
}