Cygwin: getgrent/getpwent: avoid local enumeration on DCs
...if we're supposed to enumerate the AD accounts anyway. This avoids some useless duplication. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
15e82eef3a
commit
c90b20192d
1 changed files with 5 additions and 0 deletions
|
@ -385,6 +385,11 @@ pg_ent::getent (void)
|
|||
case from_local:
|
||||
if (from_db
|
||||
&& nss_db_enum_local ()
|
||||
/* Domain controller? If so, sam and ad are one and the same
|
||||
and "local ad" would list all domain accounts twice without
|
||||
this test. */
|
||||
&& (cygheap->dom.account_flat_name ()[0] != L'@'
|
||||
|| !nss_db_enum_primary ())
|
||||
&& (entry = enumerate_local ()))
|
||||
return entry;
|
||||
state = from_sam;
|
||||
|
|
Loading…
Add table
Reference in a new issue