Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2014-07-07 14:22:51 +0400
committerCorinna Vinschen <corinna@vinschen.de>2014-07-07 14:22:51 +0400
commit72506dd846ff4021bdbcf0f6802748920db2b56e (patch)
tree562523b3bcec6f65cfed7490b5390d345d36dcda /winsup/cygwin/passwd.cc
parentf0c23915ec2131b2867f04fe3e117807973a2aa1 (diff)
* passwd.cc (pg_ent::enumerate_ad): Revert to simply skipping a domain
if opening the connection to the domain fails.
Diffstat (limited to 'winsup/cygwin/passwd.cc')
-rw-r--r--winsup/cygwin/passwd.cc21
1 files changed, 5 insertions, 16 deletions
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
{