summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-06-08 15:44:00 +0300
committerKamen Mazdrashki <kamenim@samba.org>2010-06-11 01:20:09 +0300
commitd02c395abdee28a7eef2cbbbf2e183da8f707004 (patch)
treeb31a288af339efce0d098ed97972bc0a68d3a429 /source4/torture
parent7135abcd8d979b9f7149e74f80edf118dc98de51 (diff)
downloadsamba-d02c395abdee28a7eef2cbbbf2e183da8f707004.tar.gz
samba-d02c395abdee28a7eef2cbbbf2e183da8f707004.tar.bz2
samba-d02c395abdee28a7eef2cbbbf2e183da8f707004.zip
s4/test: Remove duplicated test_opendomain() functionality
We already have a nice common test_domain_open() function in libnet/util.c
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/libnet/libnet_group.c55
1 files changed, 1 insertions, 54 deletions
diff --git a/source4/torture/libnet/libnet_group.c b/source4/torture/libnet/libnet_group.c
index f26f988027..20f47466aa 100644
--- a/source4/torture/libnet/libnet_group.c
+++ b/source4/torture/libnet/libnet_group.c
@@ -139,59 +139,6 @@ static bool test_creategroup(struct torture_context *tctx,
}
-static bool test_opendomain(struct torture_context *tctx,
- struct dcerpc_binding_handle *b, TALLOC_CTX *mem_ctx,
- struct policy_handle *handle, struct lsa_String *domname)
-{
- struct policy_handle h, domain_handle;
- struct samr_Connect r1;
- struct samr_LookupDomain r2;
- struct dom_sid2 *sid = NULL;
- struct samr_OpenDomain r3;
-
- torture_comment(tctx, "connecting\n");
-
- r1.in.system_name = 0;
- r1.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
- r1.out.connect_handle = &h;
-
- torture_assert_ntstatus_ok(tctx,
- dcerpc_samr_Connect_r(b, mem_ctx, &r1),
- "Connect failed");
- torture_assert_ntstatus_ok(tctx, r1.out.result,
- "Connect failed");
-
- r2.in.connect_handle = &h;
- r2.in.domain_name = domname;
- r2.out.sid = &sid;
-
- torture_comment(tctx, "domain lookup on %s\n", domname->string);
-
- torture_assert_ntstatus_ok(tctx,
- dcerpc_samr_LookupDomain_r(b, mem_ctx, &r2),
- "LookupDomain failed");
- torture_assert_ntstatus_ok(tctx, r2.out.result,
- "LookupDomain failed");
-
- r3.in.connect_handle = &h;
- r3.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
- r3.in.sid = *r2.out.sid;
- r3.out.domain_handle = &domain_handle;
-
- torture_comment(tctx, "opening domain\n");
-
- torture_assert_ntstatus_ok(tctx,
- dcerpc_samr_OpenDomain_r(b, mem_ctx, &r3),
- "OpenDomain failed");
- torture_assert_ntstatus_ok(tctx, r3.out.result,
- "OpenDomain failed");
-
- *handle = domain_handle;
-
- return true;
-}
-
-
static bool test_lsa_close(struct torture_context *tctx,
struct dcerpc_binding_handle *b, TALLOC_CTX *mem_ctx,
struct policy_handle *domain_handle)
@@ -236,7 +183,7 @@ bool torture_groupinfo_api(struct torture_context *torture)
}
domain_name.string = lp_workgroup(torture->lp_ctx);
- if (!test_opendomain(torture, p->binding_handle, prep_mem_ctx, &h, &domain_name)) {
+ if (!test_domain_open(torture, p->binding_handle, &domain_name, prep_mem_ctx, &h, NULL)) {
ret = false;
goto done;
}