summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_backend_db.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index b729e58daf..c0ee8017c1 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -671,7 +671,10 @@ bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr)
continue;
}
- path = talloc_asprintf(ctx, "%s/%s", key, oldkeyname);
+ path = talloc_asprintf(ctx, "%s/%s/%s",
+ REG_VALUE_PREFIX,
+ key,
+ oldkeyname );
if (!path) {
goto cancel;
}
@@ -679,17 +682,11 @@ bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr)
if (!path) {
goto cancel;
}
- status = dbwrap_delete_bystring(regdb, path);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(1, ("Deleting %s failed\n", path));
- goto cancel;
- }
-
+ /* Ignore errors here, we might have no values around */
+ dbwrap_delete_bystring(regdb, path);
TALLOC_FREE(path);
- path = talloc_asprintf(ctx, "%s/%s/%s",
- REG_VALUE_PREFIX,
- key,
- oldkeyname );
+
+ path = talloc_asprintf(ctx, "%s/%s", key, oldkeyname);
if (!path) {
goto cancel;
}
@@ -697,11 +694,11 @@ bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr)
if (!path) {
goto cancel;
}
-
- /*
- * Ignore errors here, we might have no values around
- */
- dbwrap_delete_bystring(regdb, path);
+ status = dbwrap_delete_bystring(regdb, path);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(1, ("Deleting %s failed\n", path));
+ goto cancel;
+ }
TALLOC_FREE(path);
}