Cygwin: load_user_profile: temporarily extend debug output
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
f18a161cff
commit
6aef5a46d7
|
@ -255,6 +255,7 @@ load_user_profile (HANDLE token, struct passwd *pw, cygpsid &usersid)
|
||||||
pi.lpUserName = username;
|
pi.lpUserName = username;
|
||||||
/* Check if user has a roaming profile and fill in lpProfilePath, if so.
|
/* Check if user has a roaming profile and fill in lpProfilePath, if so.
|
||||||
Call NetUserGetInfo only for local machine accounts, use LDAP otherwise. */
|
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 ()))
|
if (!wcscasecmp (domain, cygheap->dom.account_flat_name ()))
|
||||||
{
|
{
|
||||||
NET_API_STATUS nas;
|
NET_API_STATUS nas;
|
||||||
|
@ -275,6 +276,7 @@ load_user_profile (HANDLE token, struct passwd *pw, cygpsid &usersid)
|
||||||
cyg_ldap cldap;
|
cyg_ldap cldap;
|
||||||
PWCHAR dnsdomain = NULL;
|
PWCHAR dnsdomain = NULL;
|
||||||
|
|
||||||
|
debug_printf ("primary domain <%W>", cygheap->dom.primary_flat_name ());
|
||||||
if (!wcscasecmp (domain, cygheap->dom.primary_flat_name ()))
|
if (!wcscasecmp (domain, cygheap->dom.primary_flat_name ()))
|
||||||
dnsdomain = wcsdup (cygheap->dom.primary_dns_name ());
|
dnsdomain = wcsdup (cygheap->dom.primary_dns_name ());
|
||||||
else
|
else
|
||||||
|
@ -282,12 +284,15 @@ load_user_profile (HANDLE token, struct passwd *pw, cygpsid &usersid)
|
||||||
PDS_DOMAIN_TRUSTSW td = NULL;
|
PDS_DOMAIN_TRUSTSW td = NULL;
|
||||||
|
|
||||||
for (ULONG idx = 0; (td = cygheap->dom.trusted_domain (idx)); ++idx)
|
for (ULONG idx = 0; (td = cygheap->dom.trusted_domain (idx)); ++idx)
|
||||||
|
{
|
||||||
|
debug_printf ("foreign domain <%W>", td->NetbiosDomainName);
|
||||||
if (!wcscasecmp (domain, td->NetbiosDomainName))
|
if (!wcscasecmp (domain, td->NetbiosDomainName))
|
||||||
{
|
{
|
||||||
dnsdomain = wcsdup (td->DnsDomainName);
|
dnsdomain = wcsdup (td->DnsDomainName);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (dnsdomain)
|
if (dnsdomain)
|
||||||
{
|
{
|
||||||
if (cldap.fetch_ad_account (usersid, false, dnsdomain))
|
if (cldap.fetch_ad_account (usersid, false, dnsdomain))
|
||||||
|
|
Loading…
Reference in New Issue