diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-01-14 12:11:17 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2014-01-16 16:22:51 +0100 |
commit | 7a97662bb53e8b048a02fec79d167f2466f4233f (patch) | |
tree | 6a8ab73228a47b580f0afe115cbfb2928a21fdfd /source4/torture/libnet | |
parent | 1c6a2f8bca06d34fd14f498a09948875ad049d7c (diff) | |
download | samba-7a97662bb53e8b048a02fec79d167f2466f4233f.tar.gz |
s4:libnet: let libnet_rpc_groupadd() 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>
Diffstat (limited to 'source4/torture/libnet')
-rw-r--r-- | source4/torture/libnet/groupman.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source4/torture/libnet/groupman.c b/source4/torture/libnet/groupman.c index 9ee3dc26fbc..8cd49db16cb 100644 --- a/source4/torture/libnet/groupman.c +++ b/source4/torture/libnet/groupman.c @@ -27,7 +27,8 @@ #include "torture/libnet/proto.h" -static bool test_groupadd(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, +static bool test_groupadd(struct torture_context *tctx, + struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle, const char *name) { @@ -35,12 +36,15 @@ static bool test_groupadd(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, bool ret = true; struct libnet_rpc_groupadd group; + ZERO_STRUCT(group); + group.in.domain_handle = *domain_handle; group.in.groupname = name; printf("Testing libnet_rpc_groupadd\n"); - status = libnet_rpc_groupadd(p, mem_ctx, &group); + status = libnet_rpc_groupadd(tctx->ev, p->binding_handle, + mem_ctx, &group); if (!NT_STATUS_IS_OK(status)) { printf("Failed to call sync libnet_rpc_groupadd - %s\n", nt_errstr(status)); return false; @@ -77,7 +81,7 @@ bool torture_groupadd(struct torture_context *torture) goto done; } - if (!test_groupadd(p, mem_ctx, &h, name)) { + if (!test_groupadd(torture, p, mem_ctx, &h, name)) { ret = false; goto done; } |