From 4095b008eee6e23e22913cc4754c2bf07c7521dd Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 7 May 2008 13:50:01 +0200 Subject: registry: check for existence of key in regdb_set_secdesc() before proceeding. Michael (This used to be commit 347bab7f4aca7f26a88affea954a514c25735abf) --- source3/registry/reg_backend_db.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- cgit