/**
* Open the registry on a remote machine.
*/
-WERROR reg_open_remote(struct registry_context **ctx,
+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,
.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,
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 */
struct registry_context *h = NULL;
WERROR error;
- error = reg_open_remote(&h, NULL, creds, lp_ctx, remote, ev_ctx);
+ error = reg_open_remote(NULL, &h, NULL, creds, lp_ctx, remote, ev_ctx);
if (!W_ERROR_IS_OK(error)) {
fprintf(stderr, "Unable to open remote registry at %s:%s \n",
error = reg_open_samba(NULL, &ctx, ev_ctx, lp_ctx, NULL, cmdline_credentials);
break;
case REG_REMOTE:
- error = reg_open_remote(&ctx, NULL, cmdline_credentials, lp_ctx,
+ error = reg_open_remote(NULL, &ctx, NULL, cmdline_credentials, lp_ctx,
remote_host, ev_ctx);
break;
case REG_NULL: