s4-libnet: Add mem_ctx to libnet_rpc_userdel calls (bug #8889)
authorAndrew Bartlett <abartlet@samba.org>
Mon, 30 Apr 2012 10:23:07 +0000 (20:23 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 30 Apr 2012 11:08:28 +0000 (13:08 +0200)
source4/libnet/libnet_user.c
source4/libnet/userman.c

index 445883491f75e10f9c92a4757c0423e0e3168094..af173e993d10e102fbe37916eb0e8a080a837625 100644 (file)
@@ -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 */
index 22a4efaddb5ba5edee920e46c9a780a584890e95..c6d1922dac32e6cfb3ee1ddb8710747a1660e83c 100644 (file)
@@ -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);
 }