]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
registry: check for existence of key in regdb_fetch_values() first.
authorMichael Adam <obnox@samba.org>
Wed, 7 May 2008 11:27:56 +0000 (13:27 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 8 May 2008 16:29:09 +0000 (18:29 +0200)
This uses the new semantics for existence of a key.

Michael
(This used to be commit 56a58690d3ab2e01ed28388bd59424d3abc7a0d3)

source3/registry/reg_backend_db.c

index 061ae1ccdb1cfa3706cb08fa2ff5b61bf7af0de9..5cbc83e3c4d3e79a80451d7ec5d107efdfbd879e 100644 (file)
@@ -977,6 +977,10 @@ int regdb_fetch_values( const char* key, REGVAL_CTR *values )
 
        DEBUG(10,("regdb_fetch_values: Looking for value of key [%s] \n", key));
 
+       if (!regdb_key_exists(key)) {
+               goto done;
+       }
+
        keystr = talloc_asprintf(ctx, "%s/%s", REG_VALUE_PREFIX, key);
        if (!keystr) {
                goto done;