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;
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;
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;
}
}
- if (!found) {
+ if ((!found) && (!builtin_domain)) {
torture_warning(tctx, "QueryDisplayInfo gave name [%s] that EnumDomainGroups did not\n",
name);
ret = false;
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",
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);