summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-05-07 13:45:02 +0200
committerMichael Adam <obnox@samba.org>2008-05-08 18:29:09 +0200
commitba94ab2ed830f75ac6593d5e057c26e7f1fbfbd3 (patch)
tree6ac124037c0a709415541498c5e93a6e6f9f03bc /source3
parent4394c2dafb65c20a0cefa168b1b7c39abb2b493b (diff)
downloadsamba-ba94ab2ed830f75ac6593d5e057c26e7f1fbfbd3.tar.gz
samba-ba94ab2ed830f75ac6593d5e057c26e7f1fbfbd3.tar.bz2
samba-ba94ab2ed830f75ac6593d5e057c26e7f1fbfbd3.zip
registry: check for existence of key in regdb_store_values() before proceeding.
Michael (This used to be commit 8a2c9d965d332ccd290089b92e9cfbba2413067c)
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 7513b3b263..44a60cf030 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -1018,6 +1018,10 @@ bool regdb_store_values( const char *key, REGVAL_CTR *values )
DEBUG(10,("regdb_store_values: Looking for value of key [%s] \n", key));
+ if (!regdb_key_exists(key)) {
+ goto done;
+ }
+
ZERO_STRUCT(data);
len = regdb_pack_values(values, data.dptr, data.dsize);