s3:services_db: does not need legacy registry code any more.
[amitay/samba.git] / source3 / registry / reg_util_legacy.c
index c99e66a40882100e63bcd1104c2d1199b0ac37f7..29b0889402368af8904d2319b30b505e610936e1 100644 (file)
@@ -20,6 +20,9 @@
 /* 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;
 }