From: Jeffrey Altman Date: Thu, 25 Mar 2010 05:23:23 +0000 (-0400) Subject: Windows: afslogon.dll vs windows 7 X-Git-Tag: openafs-devel-1_5_73_1~15 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=4b3f3169cb89c80acc0cc70d51cf47ed32c22ab2;p=packages%2Fo%2Fopenafs.git 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 --- 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++) {