/* Implementation of registry frontend view functions. */
#include "includes.h"
+#include "registry.h"
+#include "reg_util_legacy.h"
+#include "reg_api_util.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
WERROR regkey_open_internal(TALLOC_CTX *ctx,
struct registry_key_handle **regkey,
const char *path,
- const struct nt_user_token *token,
+ const struct security_token *token,
uint32 access_desired )
{
struct registry_key *key;
WERROR err;
+ TALLOC_CTX *tmp_ctx = talloc_stackframe();
- err = reg_open_path(NULL, path, access_desired, token, &key);
+ err = reg_open_path(tmp_ctx, path, access_desired, token, &key);
if (!W_ERROR_IS_OK(err)) {
return err;
}
*regkey = talloc_move(ctx, &key->key);
- TALLOC_FREE(key);
+ TALLOC_FREE(tmp_ctx);
return WERR_OK;
}