summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/samr.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 3620211bae..d3621e4a30 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -5921,6 +5921,7 @@ static bool test_EnumDomainGroups_all(struct dcerpc_pipe *p,
uint32_t num_entries = 0;
int i;
bool ret = true;
+ bool universal_group_found = false;
torture_comment(tctx, "Testing EnumDomainGroups\n");
@@ -5945,6 +5946,20 @@ static bool test_EnumDomainGroups_all(struct dcerpc_pipe *p,
if (!test_OpenGroup(p, tctx, handle, sam->entries[i].idx)) {
ret = false;
}
+ if ((ret == true) && (strcasecmp(sam->entries[i].name.string,
+ "Enterprise Admins") == 0)) {
+ universal_group_found = true;
+ }
+ }
+
+ /* when we are running this on s4 we should get back at least the
+ * "Enterprise Admins" universal group. If we don't get a group entry
+ * at all we probably are performing the test on the builtin domain.
+ * So ignore this case. */
+ if (torture_setting_bool(tctx, "samba4", false)) {
+ if ((sam->count > 0) && (!universal_group_found)) {
+ ret = false;
+ }
}
return ret;