diff --git a/source4/libnet/userman.c b/source4/libnet/userman.c index abb41429e99..2e1dff75400 100644 --- a/source4/libnet/userman.c +++ b/source4/libnet/userman.c @@ -180,12 +180,12 @@ NTSTATUS libnet_rpc_useradd_recv(struct composite_context *c, TALLOC_CTX *mem_ct * @return nt status code of execution */ -NTSTATUS libnet_rpc_useradd(struct dcerpc_pipe *p, +NTSTATUS libnet_rpc_useradd(struct tevent_context *ev, + struct dcerpc_binding_handle *b, TALLOC_CTX *mem_ctx, struct libnet_rpc_useradd *io) { - struct composite_context *c = libnet_rpc_useradd_send(mem_ctx, p->conn->event_ctx, - p->binding_handle, io, NULL); + struct composite_context *c = libnet_rpc_useradd_send(mem_ctx, ev, b, io, NULL); return libnet_rpc_useradd_recv(c, mem_ctx, io); } diff --git a/source4/torture/libnet/userman.c b/source4/torture/libnet/userman.c index 00f19d9bd6b..05e9592d3c8 100644 --- a/source4/torture/libnet/userman.c +++ b/source4/torture/libnet/userman.c @@ -42,7 +42,7 @@ static bool test_useradd(struct torture_context *tctx, torture_comment(tctx, "Testing libnet_rpc_useradd\n"); - status = libnet_rpc_useradd(p, mem_ctx, &user); + status = libnet_rpc_useradd(tctx->ev, p->binding_handle, mem_ctx, &user); if (!NT_STATUS_IS_OK(status)) { torture_comment(tctx, "Failed to call libnet_rpc_useradd - %s\n", nt_errstr(status)); return false;