From 4b3f3169cb89c80acc0cc70d51cf47ed32c22ab2 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Thu, 25 Mar 2010 01:23:23 -0400 Subject: [PATCH] Windows: afslogon.dll vs windows 7 In Windows 7 the GINA is no longer used. As a result, when a non-Heimdal realm is used for logon, the LogonDomain field is no longer populated during the NPLogonNotify call. Instead we must obtain the Kerberos realm from the UPN specified in the Username field. Change-Id: I838e0a5b19d560dd2fed6ccccf1e136fe1c4e0c2 Reviewed-on: http://gerrit.openafs.org/1660 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/WINNT/afsd/afslogon.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/WINNT/afsd/afslogon.c b/src/WINNT/afsd/afslogon.c index 0554eed6d..be5876e22 100644 --- a/src/WINNT/afsd/afslogon.c +++ b/src/WINNT/afsd/afslogon.c @@ -854,9 +854,14 @@ DWORD APIENTRY NPLogonNotify( !UnicodeStringToANSI(IL->LogonDomainName, logonDomain, MAX_DOMAIN_LENGTH)) return 0; - /* Make sure AD-DOMANS sent from login that is sent to us is striped */ + /* Make sure AD-DOMAINS sent from login that is sent to us is striped */ ctemp = strchr(uname, '@'); - if (ctemp) *ctemp = 0; + if (ctemp) { + *ctemp = 0; + ctemp++; + if ( logonDomain[0] == '\0' ) + StringCchCopy(logonDomain, MAX_DOMAIN_LENGTH, ctemp); + } /* is the name all lowercase? */ for ( ctemp = uname; *ctemp ; ctemp++) { -- 2.39.5