}
if (mp == NULL)
- return WERR_NOT_FOUND;
+ return WERR_BADFILE;
*key = reg_import_hive_key(ctx, mp->key,
mp->path.predefined_key,
error = reg_open_hive(ctx, location, auth_info, creds, lp_ctx, &hive);
- if (W_ERROR_EQUAL(error, WERR_NOT_FOUND))
+ if (W_ERROR_EQUAL(error, WERR_BADFILE))
error = reg_open_ldb_file(ctx, location, auth_info,
creds, lp_ctx, &hive);
WERROR error;
error = reg_get_predefined_key(rctx, 1337, &root);
- torture_assert_werr_equal(tctx, error, WERR_NOT_FOUND,
+ torture_assert_werr_equal(tctx, error, WERR_BADFILE,
"getting predefined key failed");
return true;
}
r->out.handle = &newh->wire_handle;
} else {
talloc_free(newh);
- /*
- * Windows expects WERR_BADFILE when a particular key
- * is not found. If we receive WERR_NOT_FOUND from the lower
- * layer calls, translate it here to return what is expected.
- */
- if (W_ERROR_EQUAL(result, WERR_NOT_FOUND))
- return WERR_BADFILE;
}
return result;