]> sourceware.org Git - newlib-cygwin.git/commitdiff
* passwd.cc (pg_ent::enumerate_ad): Revert to simply skipping a domain
authorCorinna Vinschen <corinna@vinschen.de>
Mon, 7 Jul 2014 10:22:51 +0000 (10:22 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Mon, 7 Jul 2014 10:22:51 +0000 (10:22 +0000)
if opening the connection to the domain fails.

winsup/cygwin/ChangeLog
winsup/cygwin/passwd.cc

index 6d339d905d989145774f0d3ba9f33c9670ef48a2..6763fa8214b52512cded25dbaead46b38e0537ba 100644 (file)
@@ -1,3 +1,8 @@
+2014-07-07  Corinna Vinschen  <corinna@vinschen.de>
+
+       * 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  <Pierre.Humblet@ieee.org>
            Corinna Vinschen  <corinna@vinschen.de>
 
index 928633559db0e6c457abcd784ab7e1a2e06a0f84..b8ed09466de0f1b13d4bb671451bc50d34538015 100644 (file)
@@ -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
            {
This page took 0.036548 seconds and 5 git commands to generate.