summaryrefslogtreecommitdiffstats
path: root/src/windows/kfwlogon/kfwlogon.c
diff options
context:
space:
mode:
authorJeffrey Altman <jaltman@secure-endpoints.com>2005-12-02 10:30:57 +0000
committerJeffrey Altman <jaltman@secure-endpoints.com>2005-12-02 10:30:57 +0000
commitb5f6a77b27b8b942c0179f99131edca986f916d1 (patch)
treead59acaf6ee0d3ea32a248e4151f0bee498a64d6 /src/windows/kfwlogon/kfwlogon.c
parent8c2441d9a6928bb6fbe699a4254c83679d4a29f9 (diff)
downloadkrb5-b5f6a77b27b8b942c0179f99131edca986f916d1.tar.gz
krb5-b5f6a77b27b8b942c0179f99131edca986f916d1.tar.xz
krb5-b5f6a77b27b8b942c0179f99131edca986f916d1.zip
KFW Network Provider updates for KFW 3.0 Beta 3
Wrap debugging statements Fix bug in KFW_get_cred that prevents acquisition of credentials. ticket: new component: windows status: resolved target_version: 1.4.4 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17534 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/windows/kfwlogon/kfwlogon.c')
-rw-r--r--src/windows/kfwlogon/kfwlogon.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/windows/kfwlogon/kfwlogon.c b/src/windows/kfwlogon/kfwlogon.c
index 70b6234830..eddf273412 100644
--- a/src/windows/kfwlogon/kfwlogon.c
+++ b/src/windows/kfwlogon/kfwlogon.c
@@ -147,8 +147,11 @@ DWORD APIENTRY NPLogonNotify(
if ( wcscmp(lpAuthentInfoType,L"MSV1_0:Interactive") &&
wcscmp(lpAuthentInfoType,L"Kerberos:Interactive") )
{
- DebugEvent("Unsupported Authentication Info Type: %S",
- lpAuthentInfoType);
+ char msg[64];
+ WideCharToMultiByte(CP_ACP, 0, lpAuthentInfoType, 0,
+ msg, sizeof(msg), NULL, NULL);
+ msg[sizeof(msg)-1]='\0';
+ DebugEvent("NPLogonNotify - Unsupported Authentication Info Type: %s", msg);
return 0;
}
@@ -164,7 +167,7 @@ DWORD APIENTRY NPLogonNotify(
UnicodeStringToANSI(IL->Password, password, MAX_PASSWORD_LENGTH);
UnicodeStringToANSI(IL->LogonDomainName, logonDomain, MAX_DOMAIN_LENGTH);
- /* Make sure AD-DOMANS sent from login that is sent to us is stripped */
+ /* Make sure AD-DOMAINS sent from login that is sent to us is stripped */
ctemp = strchr(uname, '@');
if (ctemp) *ctemp = 0;
@@ -177,13 +180,15 @@ DWORD APIENTRY NPLogonNotify(
}
code = KFW_get_cred(uname, password, 0, &reason);
- DebugEvent("KFW_get_cred uname=[%s] code=[%d]",uname, code);
+ DebugEvent("NPLogonNotify - KFW_get_cred uname=[%s] code=[%d]",uname, code);
/* remove any kerberos 5 tickets currently held by the SYSTEM account
* for this user
*/
- sprintf(szLogonId,"kfwlogon-%d.%d",lpLogonId->HighPart, lpLogonId->LowPart);
- KFW_copy_cache_to_system_file(uname, szLogonId);
+ if (!code) {
+ sprintf(szLogonId,"kfwlogon-%d.%d",lpLogonId->HighPart, lpLogonId->LowPart);
+ KFW_copy_cache_to_system_file(uname, szLogonId);
+ }
KFW_destroy_tickets_for_principal(uname);
@@ -202,6 +207,11 @@ DWORD APIENTRY NPLogonNotify(
SetLastError(code);
}
+ if (code)
+ DebugEvent0("NPLogonNotify failure");
+ else
+ DebugEvent0("NPLogonNotify success");
+
return code;
}