mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
s3:registry: improve regdb_create_subkey_internal() to always complete incomlete keys
Originally, this function did not create the key's subkey list record if only the record was listed in the subkeylist of its parent key. Now this is fixed. Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
This commit is contained in:
parent
9d688cd7be
commit
240d6217dd
@ -1298,8 +1298,18 @@ static WERROR regdb_create_subkey_internal(struct db_context *db,
|
|||||||
W_ERROR_NOT_OK_GOTO_DONE(werr);
|
W_ERROR_NOT_OK_GOTO_DONE(werr);
|
||||||
|
|
||||||
if (regsubkey_ctr_key_exists(subkeys, subkey)) {
|
if (regsubkey_ctr_key_exists(subkeys, subkey)) {
|
||||||
werr = WERR_OK;
|
char *newkey;
|
||||||
goto done;
|
|
||||||
|
newkey = talloc_asprintf(mem_ctx, "%s\\%s", key, subkey);
|
||||||
|
if (newkey == NULL) {
|
||||||
|
werr = WERR_NOMEM;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (regdb_key_exists(db, newkey)) {
|
||||||
|
werr = WERR_OK;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
talloc_free(subkeys);
|
talloc_free(subkeys);
|
||||||
|
Loading…
Reference in New Issue
Block a user