diff options
author | Michael Adam <obnox@samba.org> | 2008-07-09 10:40:39 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-07-09 10:43:25 +0200 |
commit | f587e0310c802109f2647fc8637db4b01c6a49d3 (patch) | |
tree | 4ab066bfc961140203cf8a650fad539f0382f251 /source3/registry | |
parent | ad2e1757e7368fd47cada55b5004fec569b18768 (diff) | |
download | samba-f587e0310c802109f2647fc8637db4b01c6a49d3.tar.gz samba-f587e0310c802109f2647fc8637db4b01c6a49d3.tar.bz2 samba-f587e0310c802109f2647fc8637db4b01c6a49d3.zip |
registry: fix logic in deleting subkeys record in regdb_fetch_keys().
Don't cancel on NT_STATUS_NOT_FOUND error from dbwrap_delete_bystring().
So deletion of an "incomlete" registry key, i.e. one with an entry in
the list of subkeys of its parent key but not a subkey list of its own,
works again.
Michael
(This used to be commit 75be2116ac2589aaf69038a4115197f40e4b16a5)
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_backend_db.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c index 3f06fba5c2..e0a7277a5d 100644 --- a/source3/registry/reg_backend_db.c +++ b/source3/registry/reg_backend_db.c @@ -723,8 +723,12 @@ bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr) goto cancel; } status = dbwrap_delete_bystring(regdb, path); - if (!NT_STATUS_IS_OK(status)) { - DEBUG(1, ("Deleting %s failed\n", path)); + /* Don't fail if the subkey record was not found. */ + 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); |