registry: check for existence of non base key in regdb_store_keys() before proceeding.
authorMichael Adam <obnox@samba.org>
Wed, 7 May 2008 12:01:49 +0000 (14:01 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 8 May 2008 16:29:09 +0000 (18:29 +0200)
Michael
(This used to be commit 52413c94fcc56c4055de4d35bea8a00646352122)

source3/registry/reg_backend_db.c

index 9468c40cf7d6a1f1d70cb4e661f0104fc4d413e7..50fc20ea82f2e3ef52995c8f9da1f127bf4456a2 100644 (file)
@@ -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