diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 6d339d905..6763fa821 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2014-07-07 Corinna Vinschen + + * passwd.cc (pg_ent::enumerate_ad): Revert to simply skipping a domain + if opening the connection to the domain fails. + 2014-07-07 Pierre Humblet Corinna Vinschen diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc index 928633559..b8ed09466 100644 --- a/winsup/cygwin/passwd.cc +++ b/winsup/cygwin/passwd.cc @@ -593,19 +593,13 @@ pg_ent::enumerate_ad () if (!cnt) { PDS_DOMAIN_TRUSTSW td; - int ret; if (!resume) { ++resume; - if (!nss_db_enum_primary ()) + if (!nss_db_enum_primary () + || cldap.enumerate_ad_accounts (NULL, group) != NO_ERROR) continue; - if ((ret = cldap.enumerate_ad_accounts (NULL, group)) != NO_ERROR) - { - cldap.close (); - set_errno (ret); - return NULL; - } } else if ((td = cygheap->dom.trusted_domain (resume - 1))) { @@ -618,15 +612,10 @@ pg_ent::enumerate_ad () if (((enums & ENUM_TDOMS_ALL) && td->Flags & DS_DOMAIN_PRIMARY) || !td->DomainSid || (!nss_db_enum_tdom (td->NetbiosDomainName) - && !nss_db_enum_tdom (td->DnsDomainName))) + && !nss_db_enum_tdom (td->DnsDomainName)) + || cldap.enumerate_ad_accounts (td->DnsDomainName, group) + != NO_ERROR) continue; - if ((ret = cldap.enumerate_ad_accounts (td->DnsDomainName, group)) - != NO_ERROR) - { - cldap.close (); - set_errno (ret); - return NULL; - } } else {