1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +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:
Michael Adam 2011-09-30 15:42:31 +02:00
parent 9d688cd7be
commit 240d6217dd

View File

@ -1298,8 +1298,18 @@ static WERROR regdb_create_subkey_internal(struct db_context *db,
W_ERROR_NOT_OK_GOTO_DONE(werr);
if (regsubkey_ctr_key_exists(subkeys, subkey)) {
werr = WERR_OK;
goto done;
char *newkey;
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);