summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-04-30 20:27:33 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-04-30 13:08:28 +0200
commit566f066a8dae5e2ac5ee633f781387cad6c686b7 (patch)
tree7d192a8835694fbd5dd988c049ffd370e05f1889 /source4/libnet
parentb72597c6e3174218e4b7e8546668542ac26d8f37 (diff)
downloadsamba-566f066a8dae5e2ac5ee633f781387cad6c686b7.tar.gz
samba-566f066a8dae5e2ac5ee633f781387cad6c686b7.tar.bz2
samba-566f066a8dae5e2ac5ee633f781387cad6c686b7.zip
s4-libnet: Add mem_ctx to libnet_rpc_groupadd calls (bug #8889)
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/groupman.c5
-rw-r--r--source4/libnet/libnet_group.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/source4/libnet/groupman.c b/source4/libnet/groupman.c
index c8762f4f14..79fefd76e8 100644
--- a/source4/libnet/groupman.c
+++ b/source4/libnet/groupman.c
@@ -42,6 +42,7 @@ static void continue_groupadd_created(struct tevent_req *subreq);
struct composite_context* libnet_rpc_groupadd_send(struct dcerpc_pipe *p,
+ TALLOC_CTX *mem_ctx,
struct libnet_rpc_groupadd *io,
void (*monitor)(struct monitor_msg*))
{
@@ -51,7 +52,7 @@ struct composite_context* libnet_rpc_groupadd_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 NULL;
s = talloc_zero(c, struct groupadd_state);
@@ -125,7 +126,7 @@ NTSTATUS libnet_rpc_groupadd(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
{
struct composite_context *c;
- c = libnet_rpc_groupadd_send(p, io, NULL);
+ c = libnet_rpc_groupadd_send(p, mem_ctx, io, NULL);
return libnet_rpc_groupadd_recv(c, mem_ctx, io);
}
diff --git a/source4/libnet/libnet_group.c b/source4/libnet/libnet_group.c
index 5fc3f2b12a..c8a95d74a8 100644
--- a/source4/libnet/libnet_group.c
+++ b/source4/libnet/libnet_group.c
@@ -76,7 +76,7 @@ struct composite_context* libnet_CreateGroup_send(struct libnet_context *ctx,
s->group_add.in.domain_handle = ctx->samr.handle;
/* send the request */
- create_req = libnet_rpc_groupadd_send(ctx->samr.pipe, &s->group_add, monitor);
+ create_req = libnet_rpc_groupadd_send(ctx->samr.pipe, s, &s->group_add, monitor);
if (composite_nomem(create_req, c)) return c;
composite_continue(c, create_req, continue_rpc_group_added, c);
@@ -101,7 +101,7 @@ static void continue_domain_opened(struct composite_context *ctx)
s->group_add.in.domain_handle = s->ctx->samr.handle;
/* send the request */
- create_req = libnet_rpc_groupadd_send(s->ctx->samr.pipe, &s->group_add,
+ create_req = libnet_rpc_groupadd_send(s->ctx->samr.pipe, s, &s->group_add,
s->monitor_fn);
if (composite_nomem(create_req, c)) return;