Imported Upstream version 4.0.0+dfsg1
[abartlet/samba-debian.git] / source4 / lib / registry / rpc.c
index f1e14c1b864cfe77310b70f5cc254f42b27f6cc5..a8f8382ec5b40982f8f2ee87bf4d5aefde71e67a 100644 (file)
@@ -475,7 +475,8 @@ static struct registry_operations reg_backend_rpc = {
        .get_key_info = rpc_get_info,
 };
 
-_PUBLIC_ WERROR reg_open_remote(struct registry_context **ctx,
+_PUBLIC_ WERROR reg_open_remote(TALLOC_CTX *mem_ctx,
+                               struct registry_context **ctx,
                                struct auth_session_info *session_info,
                                struct cli_credentials *credentials,
                                struct loadparm_context *lp_ctx,
@@ -485,9 +486,9 @@ _PUBLIC_ WERROR reg_open_remote(struct registry_context **ctx,
        struct dcerpc_pipe *p;
        struct rpc_registry_context *rctx;
 
-       dcerpc_init(lp_ctx);
+       dcerpc_init();
 
-       rctx = talloc(NULL, struct rpc_registry_context);
+       rctx = talloc(mem_ctx, struct rpc_registry_context);
        W_ERROR_HAVE_NO_MEMORY(rctx);
 
        /* Default to local smbd if no connection is specified */