diff options
author | Ivo De Decker <ivo.dedecker@ugent.be> | 2013-05-10 13:33:02 +0200 |
---|---|---|
committer | Ivo De Decker <ivo.dedecker@ugent.be> | 2013-05-10 13:33:02 +0200 |
commit | 31202ad025bcdeb2585d18dc3f4641b5cf9c0ec4 (patch) | |
tree | 32c20d66684ac97b86e55495146e9a676bfae85a /source4/lib/registry/tools/regdiff.c | |
parent | 2865eba17fddda6c49f1209ca92d539111e7ff93 (diff) | |
download | samba-31202ad025bcdeb2585d18dc3f4641b5cf9c0ec4.tar.gz |
Imported Upstream version 4.0.0+dfsg1upstream/4.0.0+dfsg1
Diffstat (limited to 'source4/lib/registry/tools/regdiff.c')
-rw-r--r-- | source4/lib/registry/tools/regdiff.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/source4/lib/registry/tools/regdiff.c b/source4/lib/registry/tools/regdiff.c index bd58f7748f..cf65de3064 100644 --- a/source4/lib/registry/tools/regdiff.c +++ b/source4/lib/registry/tools/regdiff.c @@ -28,7 +28,8 @@ enum reg_backend { REG_UNKNOWN, REG_LOCAL, REG_REMOTE, REG_NULL }; -static struct registry_context *open_backend(poptContext pc, +static struct registry_context *open_backend(TALLOC_CTX *mem_ctx, + poptContext pc, struct tevent_context *ev_ctx, struct loadparm_context *lp_ctx, enum reg_backend backend, @@ -42,14 +43,14 @@ static struct registry_context *open_backend(poptContext pc, poptPrintUsage(pc, stderr, 0); return NULL; case REG_LOCAL: - error = reg_open_samba(NULL, &ctx, ev_ctx, lp_ctx, NULL, cmdline_credentials); + error = reg_open_samba(mem_ctx, &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(mem_ctx, &ctx, NULL, cmdline_credentials, lp_ctx, remote_host, ev_ctx); break; case REG_NULL: - error = reg_open_local(NULL, &ctx); + error = reg_open_local(mem_ctx, &ctx); break; } @@ -118,13 +119,13 @@ int main(int argc, const char **argv) } - ev_ctx = s4_event_context_init(NULL); + ev_ctx = s4_event_context_init(ctx); - h1 = open_backend(pc, ev_ctx, cmdline_lp_ctx, backend1, remote1); + h1 = open_backend(ctx, pc, ev_ctx, cmdline_lp_ctx, backend1, remote1); if (h1 == NULL) return 1; - h2 = open_backend(pc, ev_ctx, cmdline_lp_ctx, backend2, remote2); + h2 = open_backend(ctx, pc, ev_ctx, cmdline_lp_ctx, backend2, remote2); if (h2 == NULL) return 1; |