1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

registry: check for existence of key in regdb_set_secdesc() before proceeding.

Michael
(This used to be commit 347bab7f4a)
This commit is contained in:
Michael Adam 2008-05-07 13:50:01 +02:00
parent 7d35d4e2a4
commit 4095b008ee

View File

@ -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;