[newlib-cygwin] Cygwin: load_user_profile: temporarily extend debug output

Corinna Vinschen corinna@sourceware.org
Fri Mar 1 15:05:00 GMT 2019


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=6aef5a46d7f22841e6a859103bb3f8acea060b84

commit 6aef5a46d7f22841e6a859103bb3f8acea060b84
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Fri Mar 1 16:05:33 2019 +0100

    Cygwin: load_user_profile: temporarily extend debug output
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/sec_auth.cc | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/winsup/cygwin/sec_auth.cc b/winsup/cygwin/sec_auth.cc
index cb216a7..0b5e112 100644
--- a/winsup/cygwin/sec_auth.cc
+++ b/winsup/cygwin/sec_auth.cc
@@ -255,6 +255,7 @@ load_user_profile (HANDLE token, struct passwd *pw, cygpsid &usersid)
   pi.lpUserName = username;
   /* Check if user has a roaming profile and fill in lpProfilePath, if so.
      Call NetUserGetInfo only for local machine accounts, use LDAP otherwise. */
+  debug_printf ("machine <%W>", cygheap->dom.account_flat_name ());
   if (!wcscasecmp (domain, cygheap->dom.account_flat_name ()))
     {
       NET_API_STATUS nas;
@@ -275,6 +276,7 @@ load_user_profile (HANDLE token, struct passwd *pw, cygpsid &usersid)
       cyg_ldap cldap;
       PWCHAR dnsdomain = NULL;
 
+      debug_printf ("primary domain <%W>", cygheap->dom.primary_flat_name ());
       if (!wcscasecmp (domain, cygheap->dom.primary_flat_name ()))
 	dnsdomain = wcsdup (cygheap->dom.primary_dns_name ());
       else
@@ -282,11 +284,14 @@ load_user_profile (HANDLE token, struct passwd *pw, cygpsid &usersid)
 	  PDS_DOMAIN_TRUSTSW td = NULL;
 
 	  for (ULONG idx = 0; (td = cygheap->dom.trusted_domain (idx)); ++idx)
-	    if (!wcscasecmp (domain, td->NetbiosDomainName))
-	      {
-		dnsdomain = wcsdup (td->DnsDomainName);
-		break;
-	      }
+	    {
+	      debug_printf ("foreign domain <%W>", td->NetbiosDomainName);
+	      if (!wcscasecmp (domain, td->NetbiosDomainName))
+		{
+		  dnsdomain = wcsdup (td->DnsDomainName);
+		  break;
+		}
+	    }
 	}
       if (dnsdomain)
 	{



More information about the Cygwin-cvs mailing list