summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_user.c8
-rw-r--r--source4/libnet/userinfo.c5
2 files changed, 8 insertions, 5 deletions
diff --git a/source4/libnet/libnet_user.c b/source4/libnet/libnet_user.c
index dc0691ac22..eef480af4a 100644
--- a/source4/libnet/libnet_user.c
+++ b/source4/libnet/libnet_user.c
@@ -423,7 +423,7 @@ struct composite_context *libnet_ModifyUser_send(struct libnet_context *ctx,
s->user_info.in.domain_handle = ctx->samr.handle;
s->user_info.in.level = level;
- userinfo_req = libnet_rpc_userinfo_send(ctx->samr.pipe, &s->user_info, monitor);
+ userinfo_req = libnet_rpc_userinfo_send(ctx->samr.pipe, s, &s->user_info, monitor);
if (composite_nomem(userinfo_req, c)) return c;
composite_continue(c, userinfo_req, continue_rpc_userinfo, c);
@@ -455,7 +455,7 @@ static void continue_domain_open_modify(struct composite_context *ctx)
s->user_info.in.username = s->r.in.user_name;
s->user_info.in.level = level;
- userinfo_req = libnet_rpc_userinfo_send(s->ctx->samr.pipe, &s->user_info, s->monitor_fn);
+ userinfo_req = libnet_rpc_userinfo_send(s->ctx->samr.pipe, s, &s->user_info, s->monitor_fn);
if (composite_nomem(userinfo_req, c)) return;
composite_continue(c, userinfo_req, continue_rpc_userinfo, c);
@@ -687,6 +687,7 @@ struct composite_context* libnet_UserInfo_send(struct libnet_context *ctx,
/* send the request */
info_req = libnet_rpc_userinfo_send(s->ctx->samr.pipe,
+ s,
&s->userinfo,
s->monitor_fn);
if (composite_nomem(info_req, c)) return c;
@@ -743,6 +744,7 @@ static void continue_domain_open_info(struct composite_context *ctx)
/* send the request */
info_req = libnet_rpc_userinfo_send(s->ctx->samr.pipe,
+ s,
&s->userinfo,
s->monitor_fn);
if (composite_nomem(info_req, c)) return;
@@ -782,7 +784,7 @@ static void continue_name_found(struct composite_context *ctx)
s->userinfo.in.level = 21;
/* send the request */
- info_req = libnet_rpc_userinfo_send(s->ctx->samr.pipe, &s->userinfo, s->monitor_fn);
+ info_req = libnet_rpc_userinfo_send(s->ctx->samr.pipe, s, &s->userinfo, s->monitor_fn);
if (composite_nomem(info_req, c)) return;
/* set the next stage */
diff --git a/source4/libnet/userinfo.c b/source4/libnet/userinfo.c
index ddb249ee96..75c46e477d 100644
--- a/source4/libnet/userinfo.c
+++ b/source4/libnet/userinfo.c
@@ -260,6 +260,7 @@ static void continue_userinfo_closeuser(struct tevent_req *subreq)
* @param io arguments and results of the call
*/
struct composite_context *libnet_rpc_userinfo_send(struct dcerpc_pipe *p,
+ TALLOC_CTX *mem_ctx,
struct libnet_rpc_userinfo *io,
void (*monitor)(struct monitor_msg*))
{
@@ -270,7 +271,7 @@ struct composite_context *libnet_rpc_userinfo_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 userinfo_state);
@@ -370,6 +371,6 @@ NTSTATUS libnet_rpc_userinfo(struct dcerpc_pipe *p,
TALLOC_CTX *mem_ctx,
struct libnet_rpc_userinfo *io)
{
- struct composite_context *c = libnet_rpc_userinfo_send(p, io, NULL);
+ struct composite_context *c = libnet_rpc_userinfo_send(p, mem_ctx, io, NULL);
return libnet_rpc_userinfo_recv(c, mem_ctx, io);
}