From 081e7909fc536cdee1c88016efa5d3a22e976926 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 30 Apr 2012 20:09:58 +1000 Subject: [PATCH] s4-libnet: Add mem_ctx to libnet_rpc_groupinfo calls (bug #8889) --- source4/libnet/groupinfo.c | 5 +++-- source4/libnet/libnet_group.c | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/source4/libnet/groupinfo.c b/source4/libnet/groupinfo.c index 0bc0d9f4b8c..9060973e02e 100644 --- a/source4/libnet/groupinfo.c +++ b/source4/libnet/groupinfo.c @@ -262,6 +262,7 @@ static void continue_groupinfo_closegroup(struct tevent_req *subreq) * @param io arguments and results of the call */ struct composite_context *libnet_rpc_groupinfo_send(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx, struct libnet_rpc_groupinfo *io, void (*monitor)(struct monitor_msg*)) { @@ -272,7 +273,7 @@ struct composite_context *libnet_rpc_groupinfo_send(struct dcerpc_pipe *p, if (!p || !io) return NULL; - c = composite_create(p, dcerpc_event_context(p)); + c = composite_create(mem_ctx, dcerpc_event_context(p)); if (c == NULL) return c; s = talloc_zero(c, struct groupinfo_state); @@ -372,6 +373,6 @@ NTSTATUS libnet_rpc_groupinfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct libnet_rpc_groupinfo *io) { - struct composite_context *c = libnet_rpc_groupinfo_send(p, io, NULL); + struct composite_context *c = libnet_rpc_groupinfo_send(p, mem_ctx, io, NULL); return libnet_rpc_groupinfo_recv(c, mem_ctx, io); } diff --git a/source4/libnet/libnet_group.c b/source4/libnet/libnet_group.c index c98a4773836..5fc3f2b12a3 100644 --- a/source4/libnet/libnet_group.c +++ b/source4/libnet/libnet_group.c @@ -257,7 +257,7 @@ struct composite_context* libnet_GroupInfo_send(struct libnet_context *ctx, s->info.in.level = GROUPINFOALL; /* send the request */ - info_req = libnet_rpc_groupinfo_send(s->ctx->samr.pipe, &s->info, s->monitor_fn); + info_req = libnet_rpc_groupinfo_send(s->ctx->samr.pipe, s, &s->info, s->monitor_fn); if (composite_nomem(info_req, c)) return c; /* set the next stage */ @@ -306,7 +306,7 @@ static void continue_domain_open_info(struct composite_context *ctx) s->info.in.level = GROUPINFOALL; /* send the request */ - info_req = libnet_rpc_groupinfo_send(s->ctx->samr.pipe, &s->info, s->monitor_fn); + info_req = libnet_rpc_groupinfo_send(s->ctx->samr.pipe, s, &s->info, s->monitor_fn); if (composite_nomem(info_req, c)) return; /* set the next stage */ @@ -348,7 +348,7 @@ static void continue_name_found(struct composite_context *ctx) s->info.in.level = GROUPINFOALL; /* send the request */ - info_req = libnet_rpc_groupinfo_send(s->ctx->samr.pipe, &s->info, s->monitor_fn); + info_req = libnet_rpc_groupinfo_send(s->ctx->samr.pipe, s, &s->info, s->monitor_fn); if (composite_nomem(info_req, c)) return; /* set the next stage */ -- 2.11.4.GIT