summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-05-07 14:01:49 +0200
committerMichael Adam <obnox@samba.org>2008-05-08 18:29:09 +0200
commit7fa4cd242163cf048785585b7a1f392aeefeb20f (patch)
tree9610ad6a8aefb5707fdc278e9aaf39b9091e108f /source3
parent8e21d223f7c5dc00e64646f98efb15131edd9027 (diff)
downloadsamba-7fa4cd242163cf048785585b7a1f392aeefeb20f.tar.gz
samba-7fa4cd242163cf048785585b7a1f392aeefeb20f.tar.bz2
samba-7fa4cd242163cf048785585b7a1f392aeefeb20f.zip
registry: check for existence of non base key in regdb_store_keys() before proceeding.
Michael (This used to be commit 52413c94fcc56c4055de4d35bea8a00646352122)
Diffstat (limited to 'source3')
-rw-r--r--source3/registry/reg_backend_db.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index 9468c40cf7..50fc20ea82 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -583,6 +583,10 @@ bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr)
TALLOC_CTX *ctx = talloc_stackframe();
NTSTATUS status;
+ if (!regdb_key_is_base_key(key) && !regdb_key_exists(key)) {
+ goto fail;
+ }
+
/*
* fetch a list of the old subkeys so we can determine if anything has
* changed