summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-02-15 10:24:51 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2011-02-15 17:40:22 +0100
commit20197c6687f83154aefa33706829af08d1d5c50a (patch)
tree8d28a5ea583ae1f182bbce626eab3042300cf1a8 /source4/torture
parent2e0a933ac87a378bf18f6a73186d291803d09d8b (diff)
downloadsamba-20197c6687f83154aefa33706829af08d1d5c50a.tar.gz
samba-20197c6687f83154aefa33706829af08d1d5c50a.tar.bz2
samba-20197c6687f83154aefa33706829af08d1d5c50a.zip
s4:torture/rpc/samr.c - fix up the "test_GroupList" suite regarding QueryDisplayInfo
This is needed to comply with the previous patch. Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Tue Feb 15 17:40:22 CET 2011 on sn-devel-104
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/samr.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index c3e3905f94..0e1500e029 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -6800,6 +6800,7 @@ static bool test_QueryDomainInfo2(struct dcerpc_binding_handle *b,
set of group names. */
static bool test_GroupList(struct dcerpc_binding_handle *b,
struct torture_context *tctx,
+ struct dom_sid *domain_sid,
struct policy_handle *handle)
{
struct samr_EnumDomainGroups q1;
@@ -6817,6 +6818,9 @@ static bool test_GroupList(struct dcerpc_binding_handle *b,
int num_names = 0;
const char **names = NULL;
+ bool builtin_domain = dom_sid_compare(domain_sid,
+ &global_sid_Builtin) == 0;
+
torture_comment(tctx, "Testing coherency of querydispinfo vs enumdomgroups\n");
q1.in.domain_handle = handle;
@@ -6847,6 +6851,11 @@ static bool test_GroupList(struct dcerpc_binding_handle *b,
torture_assert(tctx, sam, "EnumDomainGroups failed to return sam");
+ if (builtin_domain) {
+ torture_assert(tctx, num_names == 0,
+ "EnumDomainGroups shouldn't return any group in the builtin domain!");
+ }
+
q2.in.domain_handle = handle;
q2.in.level = 5;
q2.in.start_idx = 0;
@@ -6879,7 +6888,7 @@ static bool test_GroupList(struct dcerpc_binding_handle *b,
}
}
- if (!found) {
+ if ((!found) && (!builtin_domain)) {
torture_warning(tctx, "QueryDisplayInfo gave name [%s] that EnumDomainGroups did not\n",
name);
ret = false;
@@ -6894,6 +6903,11 @@ static bool test_GroupList(struct dcerpc_binding_handle *b,
ret = false;
}
+ if (builtin_domain) {
+ torture_assert(tctx, q2.in.start_idx != 0,
+ "QueryDisplayInfo should return all domain groups also on the builtin domain handle!");
+ }
+
for (i=0; i<num_names; i++) {
if (names[i] != NULL) {
torture_warning(tctx, "EnumDomainGroups gave name [%s] that QueryDisplayInfo did not\n",
@@ -7646,7 +7660,7 @@ static bool test_OpenDomain(struct dcerpc_pipe *p, struct torture_context *tctx,
ret &= test_GetDisplayEnumerationIndex(b, tctx, &domain_handle);
ret &= test_GetDisplayEnumerationIndex2(b, tctx, &domain_handle);
}
- ret &= test_GroupList(b, tctx, &domain_handle);
+ ret &= test_GroupList(b, tctx, sid, &domain_handle);
ret &= test_TestPrivateFunctionsDomain(b, tctx, &domain_handle);
ret &= test_RidToSid(b, tctx, sid, &domain_handle);
ret &= test_GetBootKeyInformation(b, tctx, &domain_handle);