diff options
author | Kamen Mazdrashki <kamenim@samba.org> | 2010-06-10 18:23:06 +0300 |
---|---|---|
committer | Kamen Mazdrashki <kamenim@samba.org> | 2010-06-11 01:20:10 +0300 |
commit | 1ceb0dd92f1c1795264832eee0711612cc58d9a8 (patch) | |
tree | ef89b32595a13bf7da88c6f4b189c5f2248d1b54 /source4/torture/libnet/libnet_group.c | |
parent | d6d8ec80f9fc713924df1c9b72ab0491bdf95bde (diff) | |
download | samba-1ceb0dd92f1c1795264832eee0711612cc58d9a8.tar.gz samba-1ceb0dd92f1c1795264832eee0711612cc58d9a8.tar.bz2 samba-1ceb0dd92f1c1795264832eee0711612cc58d9a8.zip |
s4/test: use test_libnet_context_init() function to create libnet_context
This way we ensure that LIBNET call will be issued against
the DC we are testing against
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; } |