diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-04-30 20:25:55 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-04-30 13:08:28 +0200 |
commit | b72597c6e3174218e4b7e8546668542ac26d8f37 (patch) | |
tree | c6c6b638977b2a4a427a8b51a43dc61a3b9e639e | |
parent | 08f8eb44076c30b2559184f788aff22e4acb24fb (diff) | |
download | samba-b72597c6e3174218e4b7e8546668542ac26d8f37.tar.gz samba-b72597c6e3174218e4b7e8546668542ac26d8f37.tar.bz2 samba-b72597c6e3174218e4b7e8546668542ac26d8f37.zip |
s4-libnet: Add mem_ctx to libnet_rpc_usermod calls (bug #8889)
-rw-r--r-- | source4/libnet/libnet_user.c | 2 | ||||
-rw-r--r-- | source4/libnet/userman.c | 5 |
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); } |