mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s4:libnet: let libnet_rpc_useradd() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
This commit is contained in:
parent
e3b8df2b09
commit
adef841a59
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user