diff options
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/passwd.cc | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index c3bfd8424..47d375094 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -6,6 +6,12 @@ 2014-03-18 Corinna Vinschen <corinna@vinschen.de> + * passwd.cc (pg_ent::enumerate_ad): Ignore primary domain in list of + trusted domains only if all trusted domains are enumerated anyway. + Explain why. + +2014-03-18 Corinna Vinschen <corinna@vinschen.de> + Partially revert patch from 2014-03-04. * exception.h (exception::handler_installed): Declare. (exception::exception): Install vectored exception handler on x86_64. diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc index 35a7ecf0b..b0e5ff8de 100644 --- a/winsup/cygwin/passwd.cc +++ b/winsup/cygwin/passwd.cc @@ -566,7 +566,12 @@ pg_ent::enumerate_ad () else if ((td = cygheap->dom.trusted_domain (resume - 1))) { ++resume; - if ((td->Flags & DS_DOMAIN_PRIMARY) + /* Ignore primary domain in list of trusted domains only if all + trusted domains are enumerated anyway. This handles an + annoying backward compatibility problem in mkpasswd/mkgroup. + Without this test, `mkpasswd -d PRIMARY_DOMAIN' wouldn't + work as expected. */ + if (((enums & ENUM_TDOMS_ALL) && td->Flags & DS_DOMAIN_PRIMARY) || !td->DomainSid || (!nss_db_enum_tdom (td->NetbiosDomainName) && !nss_db_enum_tdom (td->DnsDomainName)) |