diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-04-30 20:14:42 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-04-30 13:08:28 +0200 |
commit | fd2b21fc38bfb562de0a14b1b38a31b7bc62288a (patch) | |
tree | ddb6c9f2a98cd83ca17560d9412fe1697b6fcf53 /source4 | |
parent | 081e7909fc536cdee1c88016efa5d3a22e976926 (diff) | |
download | samba-fd2b21fc38bfb562de0a14b1b38a31b7bc62288a.tar.gz samba-fd2b21fc38bfb562de0a14b1b38a31b7bc62288a.tar.bz2 samba-fd2b21fc38bfb562de0a14b1b38a31b7bc62288a.zip |
s4-libnet: Add mem_ctx to libnet_rpc_useradd calls (bug #8889)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libnet/libnet_user.c | 4 | ||||
-rw-r--r-- | source4/libnet/userman.c | 5 | ||||
-rw-r--r-- | source4/torture/libnet/userman.c | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/source4/libnet/libnet_user.c b/source4/libnet/libnet_user.c index c94e636c86..445883491f 100644 --- a/source4/libnet/libnet_user.c +++ b/source4/libnet/libnet_user.c @@ -88,7 +88,7 @@ struct composite_context* libnet_CreateUser_send(struct libnet_context *ctx, s->user_add.in.domain_handle = ctx->samr.handle; /* send the request */ - create_req = libnet_rpc_useradd_send(ctx->samr.pipe, &s->user_add, monitor); + create_req = libnet_rpc_useradd_send(ctx->samr.pipe, s, &s->user_add, monitor); if (composite_nomem(create_req, c)) return c; /* set the next stage */ @@ -123,7 +123,7 @@ static void continue_domain_open_create(struct composite_context *ctx) s->user_add.in.domain_handle = s->ctx->samr.handle; /* send the request */ - create_req = libnet_rpc_useradd_send(s->ctx->samr.pipe, &s->user_add, s->monitor_fn); + create_req = libnet_rpc_useradd_send(s->ctx->samr.pipe, s, &s->user_add, s->monitor_fn); if (composite_nomem(create_req, c)) return; /* set the next stage */ diff --git a/source4/libnet/userman.c b/source4/libnet/userman.c index 0f586b1d43..22a4efaddb 100644 --- a/source4/libnet/userman.c +++ b/source4/libnet/userman.c @@ -95,6 +95,7 @@ static void continue_useradd_create(struct tevent_req *subreq) */ struct composite_context *libnet_rpc_useradd_send(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx, struct libnet_rpc_useradd *io, void (*monitor)(struct monitor_msg*)) { @@ -105,7 +106,7 @@ struct composite_context *libnet_rpc_useradd_send(struct dcerpc_pipe *p, if (!p || !io) return NULL; /* composite allocation and setup */ - c = composite_create(p, dcerpc_event_context(p)); + c = composite_create(mem_ctx, dcerpc_event_context(p)); if (c == NULL) return NULL; s = talloc_zero(c, struct useradd_state); @@ -182,7 +183,7 @@ NTSTATUS libnet_rpc_useradd(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct libnet_rpc_useradd *io) { - struct composite_context *c = libnet_rpc_useradd_send(p, io, NULL); + struct composite_context *c = libnet_rpc_useradd_send(p, mem_ctx, io, NULL); return libnet_rpc_useradd_recv(c, mem_ctx, io); } diff --git a/source4/torture/libnet/userman.c b/source4/torture/libnet/userman.c index ad4fa92f8c..16e169f6d2 100644 --- a/source4/torture/libnet/userman.c +++ b/source4/torture/libnet/userman.c @@ -65,7 +65,7 @@ static bool test_useradd_async(struct torture_context *tctx, torture_comment(tctx, "Testing async libnet_rpc_useradd\n"); - c = libnet_rpc_useradd_send(p, &user, msg_handler); + c = libnet_rpc_useradd_send(p, mem_ctx, &user, msg_handler); if (!c) { torture_comment(tctx, "Failed to call async libnet_rpc_useradd\n"); return false; |