summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_user.c2
-rw-r--r--source4/libnet/userman.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/source4/libnet/libnet_user.c b/source4/libnet/libnet_user.c
index af173e993d..1a73652454 100644
--- a/source4/libnet/libnet_user.c
+++ b/source4/libnet/libnet_user.c
@@ -483,7 +483,7 @@ static void continue_rpc_userinfo(struct composite_context *ctx)
c->status = set_user_changes(c, &s->user_mod.in.change, &s->user_info, &s->r);
- usermod_req = libnet_rpc_usermod_send(s->ctx->samr.pipe, &s->user_mod, s->monitor_fn);
+ usermod_req = libnet_rpc_usermod_send(s->ctx->samr.pipe, s, &s->user_mod, s->monitor_fn);
if (composite_nomem(usermod_req, c)) return;
composite_continue(c, usermod_req, continue_rpc_usermod, c);
diff --git a/source4/libnet/userman.c b/source4/libnet/userman.c
index c6d1922dac..c1ee017990 100644
--- a/source4/libnet/userman.c
+++ b/source4/libnet/userman.c
@@ -837,6 +837,7 @@ static void continue_usermod_user_changed(struct tevent_req *subreq)
*/
struct composite_context *libnet_rpc_usermod_send(struct dcerpc_pipe *p,
+ TALLOC_CTX *mem_ctx,
struct libnet_rpc_usermod *io,
void (*monitor)(struct monitor_msg*))
{
@@ -845,7 +846,7 @@ struct composite_context *libnet_rpc_usermod_send(struct dcerpc_pipe *p,
struct tevent_req *subreq;
/* composite context 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 usermod_state);
if (composite_nomem(s, c)) return c;
@@ -914,6 +915,6 @@ NTSTATUS libnet_rpc_usermod(struct dcerpc_pipe *p,
TALLOC_CTX *mem_ctx,
struct libnet_rpc_usermod *io)
{
- struct composite_context *c = libnet_rpc_usermod_send(p, io, NULL);
+ struct composite_context *c = libnet_rpc_usermod_send(p, mem_ctx, io, NULL);
return libnet_rpc_usermod_recv(c, mem_ctx, io);
}