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