s3:winbindd: list users/groups of our own domain as AD DC
authorStefan Metzmacher <metze@samba.org>
Sat, 28 Mar 2015 08:31:05 +0000 (08:31 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 5 May 2015 23:22:14 +0000 (01:22 +0200)
The AD users/groups of the local domain of an AD DC
only exist via winbindd and not in /etc/passwd or /etc/group.

This also matches the behaviour of the source4/winbind code.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11183

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
selftest/knownfail
source3/winbindd/winbindd_util.c

index 777a4e4835ba14f1066f341af2308151a129163c..3262c9c185ff8e74bebe8a20f8511c08ba6774bb 100644 (file)
 ^samba4.winbind.struct.getdcname\(s4member:local\)
 ^samba.blackbox.wbinfo\(s4member:local\).wbinfo -r against s4member\(s4member:local\)
 ^samba.blackbox.wbinfo\(s4member:local\).wbinfo --user-sids against s4member\(s4member:local\)
-^samba4.winbind.struct.getpwent\(ad_dc:local\)
 ^samba.wbinfo_simple.\(s4member:local\).--user-groups
 ^samba.nss.test using winbind\(s4member:local\)
 #
 ^samba3.local.nss.reentrant enumeration crosschecks\(ad_dc_ntvfs:local\)
 ^samba3.local.nss.reentrant enumeration\(ad_dc_ntvfs:local\)
 ^samba3.local.nss.enumeration\(ad_dc_ntvfs:local\)
+^samba3.local.nss.reentrant enumeration crosschecks\(ad_dc:local\)
+^samba3.local.nss.reentrant enumeration\(ad_dc:local\)
+^samba3.local.nss.enumeration\(ad_dc:local\)
 #
 # These fail only if we run the unix.whoami test before them
 # in the member and ad_member environments. ==> Strange!!!
index 88c7568bf4b72ef092a3d693fc4cc6c33a17dad7..021f5ca1d6c6cd277d15d89983a9d5b0ddf72cfc 100644 (file)
@@ -87,10 +87,13 @@ struct winbindd_domain *wb_next_domain(struct winbindd_domain *domain)
                domain = domain->next;
        }
 
-       if ((domain != NULL)
-           && sid_check_is_our_sam(&domain->sid)) {
+       if ((domain != NULL) &&
+           (lp_server_role() != ROLE_ACTIVE_DIRECTORY_DC) &&
+           sid_check_is_our_sam(&domain->sid))
+       {
                domain = domain->next;
        }
+
        return domain;
 }