Bug 281991. Fix for domain on Vista.

This commit is contained in:
Jim Norman 2007-08-08 21:38:22 +00:00
parent 3dd944a25b
commit 51529653f5

View File

@ -377,7 +377,7 @@ NPLogonNotify (
CP_UTF8,
0,
pAuthInfo->UserName.Buffer,
-1,
pAuthInfo->UserName.Length/sizeof(WCHAR) + 1, //-1,
(LPSTR)&basicCredential.username,
NSSCS_MAX_USERID_LEN,
NULL,
@ -391,7 +391,7 @@ NPLogonNotify (
CP_UTF8,
0,
pAuthInfo->Password.Buffer,
-1,
pAuthInfo->Password.Length/sizeof(WCHAR) + 1, //-1,
(LPSTR)&basicCredential.password,
NSSCS_MAX_PWORD_LEN,
NULL,
@ -431,28 +431,30 @@ NPLogonNotify (
if (pAuthInfo->LogonDomainName.Length != 0)
{
domainCredential.len = WideCharToMultiByte(
memset(domainCredential.id, 0, NSSCS_MAX_SECRET_ID_LEN);
domainCredential.len = WideCharToMultiByte(
CP_UTF8,
0,
pAuthInfo->LogonDomainName.Buffer,
-1,
pAuthInfo->LogonDomainName.Length/sizeof(WCHAR),
(LPSTR)&domainCredential.id,
NSSCS_MAX_SECRET_ID_LEN,
NULL,
NULL);
if (domainCredential.len)
{
// domainCredential.len++;
#ifdef _DEBUG
DebugPrint("Domain exists - [%s], length %d\n", domainCredential.id, domainCredential.len);
#endif
ccode = (*pCASASetCredential)(
0,
&desktopCredential,
&domainCredential,
0,
&desktopCredential,
&domainCredential,
SSCS_CRED_TYPE_BASIC_F,
&basicCredential,
&extension);