summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/registry/reg_backend_db.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index b1e3e2b5a3..3f06fba5c2 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -701,8 +701,15 @@ 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);
+ /* Don't fail if there are no values around. */
+ if (!NT_STATUS_IS_OK(status) &&
+ !NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND))
+ {
+ DEBUG(1, ("Deleting %s failed: %s\n", path,
+ nt_errstr(status)));
+ goto cancel;
+ }
TALLOC_FREE(path);
/* (c) Delete the list of subkeys of this key */