diff options
Diffstat (limited to 'source4/torture/libnet/libnet_group.c')
-rw-r--r-- | source4/torture/libnet/libnet_group.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/torture/libnet/libnet_group.c b/source4/torture/libnet/libnet_group.c index ddc5630af6..0d8249f9f3 100644 --- a/source4/torture/libnet/libnet_group.c +++ b/source4/torture/libnet/libnet_group.c @@ -57,7 +57,7 @@ bool torture_groupinfo_api(struct torture_context *torture) bool ret = true; NTSTATUS status; TALLOC_CTX *mem_ctx = NULL, *prep_mem_ctx; - struct libnet_context *ctx; + struct libnet_context *ctx = NULL; struct dcerpc_pipe *p; struct policy_handle h; struct lsa_String domain_name; @@ -65,9 +65,6 @@ bool torture_groupinfo_api(struct torture_context *torture) prep_mem_ctx = talloc_init("prepare torture group info"); - ctx = libnet_context_init(torture->ev, torture->lp_ctx); - ctx->cred = cmdline_credentials; - status = torture_rpc_connection(torture, &p, &ndr_table_samr); @@ -88,6 +85,10 @@ bool torture_groupinfo_api(struct torture_context *torture) mem_ctx = talloc_init("torture group info"); + if (!test_libnet_context_init(torture, true, &ctx)) { + return false; + } + ZERO_STRUCT(req); req.in.domain_name = domain_name.string; @@ -113,9 +114,8 @@ bool torture_groupinfo_api(struct torture_context *torture) ret = false; } - talloc_free(ctx); - done: + talloc_free(ctx); talloc_free(mem_ctx); return ret; } |