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:
parent
7d35d4e2a4
commit
4095b008ee
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user