summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-05-07 13:50:01 +0200
committerMichael Adam <obnox@samba.org>2008-05-08 18:29:09 +0200
commit4095b008eee6e23e22913cc4754c2bf07c7521dd (patch)
tree92cd6c53b57c2014f80f0b22353aae10cdfe40a5
parent7d35d4e2a4063f7a9daa65e8f748cbeb57eb9dc0 (diff)
downloadsamba-4095b008eee6e23e22913cc4754c2bf07c7521dd.tar.gz
samba-4095b008eee6e23e22913cc4754c2bf07c7521dd.tar.bz2
samba-4095b008eee6e23e22913cc4754c2bf07c7521dd.zip
registry: check for existence of key in regdb_set_secdesc() before proceeding.
Michael (This used to be commit 347bab7f4aca7f26a88affea954a514c25735abf)
-rw-r--r--source3/registry/reg_backend_db.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index 372ee3f18f..3089c43eba 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -1118,6 +1118,11 @@ static WERROR regdb_set_secdesc(const char *key,
WERROR err = WERR_NOMEM;
TDB_DATA tdbdata;
+ if (!regdb_key_exists(key)) {
+ err = WERR_BADFILE;
+ goto done;
+ }
+
tdbkey = talloc_asprintf(mem_ctx, "%s/%s", REG_SECDESC_PREFIX, key);
if (tdbkey == NULL) {
goto done;