summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_user.c4
-rw-r--r--source4/libnet/userman.c5
2 files changed, 5 insertions, 4 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);
}