diff options
author | Michael Adam <obnox@samba.org> | 2012-07-13 00:16:09 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2012-07-13 00:57:19 +0200 |
commit | 6ee16cefc98c8a033664be476be4446599450d23 (patch) | |
tree | 36072226ada62ff52b6c91107457432baee25ed2 /source4/lib/registry | |
parent | e454681276ffa34984dda56e74d2fda05a24636c (diff) | |
download | samba-6ee16cefc98c8a033664be476be4446599450d23.tar.gz samba-6ee16cefc98c8a033664be476be4446599450d23.tar.bz2 samba-6ee16cefc98c8a033664be476be4446599450d23.zip |
s4:registry: add a TALLOC_CTX argument to reg_open_remote()
Diffstat (limited to 'source4/lib/registry')
-rw-r--r-- | source4/lib/registry/registry.h | 3 | ||||
-rw-r--r-- | source4/lib/registry/rpc.c | 5 | ||||
-rw-r--r-- | source4/lib/registry/tools/common.c | 2 | ||||
-rw-r--r-- | source4/lib/registry/tools/regdiff.c | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/source4/lib/registry/registry.h b/source4/lib/registry/registry.h index 8a8271e3c9..c22038cbfa 100644 --- a/source4/lib/registry/registry.h +++ b/source4/lib/registry/registry.h @@ -379,7 +379,8 @@ WERROR reg_open_samba(TALLOC_CTX *mem_ctx, /** * 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, diff --git a/source4/lib/registry/rpc.c b/source4/lib/registry/rpc.c index 42b7374f7a..a8f8382ec5 100644 --- a/source4/lib/registry/rpc.c +++ b/source4/lib/registry/rpc.c @@ -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, @@ -487,7 +488,7 @@ _PUBLIC_ WERROR reg_open_remote(struct registry_context **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 */ diff --git a/source4/lib/registry/tools/common.c b/source4/lib/registry/tools/common.c index d997cb0fde..a2fda8d48d 100644 --- a/source4/lib/registry/tools/common.c +++ b/source4/lib/registry/tools/common.c @@ -31,7 +31,7 @@ struct registry_context *reg_common_open_remote(const char *remote, 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", diff --git a/source4/lib/registry/tools/regdiff.c b/source4/lib/registry/tools/regdiff.c index bd58f7748f..3683e76da6 100644 --- a/source4/lib/registry/tools/regdiff.c +++ b/source4/lib/registry/tools/regdiff.c @@ -45,7 +45,7 @@ static struct registry_context *open_backend(poptContext pc, 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: |