summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-04-30 20:23:07 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-04-30 13:08:28 +0200
commit08f8eb44076c30b2559184f788aff22e4acb24fb (patch)
treea4a412427fa1b7be12b3c4b7b2e1a5a4bd768091
parentfd2b21fc38bfb562de0a14b1b38a31b7bc62288a (diff)
downloadsamba-08f8eb44076c30b2559184f788aff22e4acb24fb.tar.gz
samba-08f8eb44076c30b2559184f788aff22e4acb24fb.tar.bz2
samba-08f8eb44076c30b2559184f788aff22e4acb24fb.zip
s4-libnet: Add mem_ctx to libnet_rpc_userdel calls (bug #8889)
-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 445883491f..af173e993d 100644
--- a/source4/libnet/libnet_user.c
+++ b/source4/libnet/libnet_user.c
@@ -256,7 +256,7 @@ struct composite_context *libnet_DeleteUser_send(struct libnet_context *ctx,
s->user_del.in.domain_handle = ctx->samr.handle;
/* send request */
- delete_req = libnet_rpc_userdel_send(ctx->samr.pipe, &s->user_del, monitor);
+ delete_req = libnet_rpc_userdel_send(ctx->samr.pipe, s, &s->user_del, monitor);
if (composite_nomem(delete_req, c)) return c;
/* set the next stage */
@@ -291,7 +291,7 @@ static void continue_domain_open_delete(struct composite_context *ctx)
s->user_del.in.domain_handle = s->ctx->samr.handle;
/* send request */
- delete_req = libnet_rpc_userdel_send(s->ctx->samr.pipe, &s->user_del, s->monitor_fn);
+ delete_req = libnet_rpc_userdel_send(s->ctx->samr.pipe, s, &s->user_del, s->monitor_fn);
if (composite_nomem(delete_req, c)) return;
/* set the next stage */
diff --git a/source4/libnet/userman.c b/source4/libnet/userman.c
index 22a4efaddb..c6d1922dac 100644
--- a/source4/libnet/userman.c
+++ b/source4/libnet/userman.c
@@ -373,6 +373,7 @@ static void continue_userdel_deleted(struct tevent_req *subreq)
*/
struct composite_context *libnet_rpc_userdel_send(struct dcerpc_pipe *p,
+ TALLOC_CTX *mem_ctx,
struct libnet_rpc_userdel *io,
void (*monitor)(struct monitor_msg*))
{
@@ -381,7 +382,7 @@ struct composite_context *libnet_rpc_userdel_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 userdel_state);
@@ -456,7 +457,7 @@ NTSTATUS libnet_rpc_userdel(struct dcerpc_pipe *p,
TALLOC_CTX *mem_ctx,
struct libnet_rpc_userdel *io)
{
- struct composite_context *c = libnet_rpc_userdel_send(p, io, NULL);
+ struct composite_context *c = libnet_rpc_userdel_send(p, mem_ctx, io, NULL);
return libnet_rpc_userdel_recv(c, mem_ctx, io);
}