HWND hwndOwner = (HWND)StationHandle;\r
BOOLEAN lowercased_name = TRUE;\r
\r
- if ( !KFW_is_available() )\r
+ /* Are we interactive? */\r
+ interactive = (wcscmp(lpStationName, L"WinSta0") == 0);\r
+\r
+ if ( !interactive || !KFW_is_available() )\r
return 0;\r
\r
DebugEvent("NPLogonNotify - LoginId(%d,%d)", lpLogonId->HighPart, lpLogonId->LowPart);\r
\r
IL = (MSV1_0_INTERACTIVE_LOGON *) lpAuthentInfo;\r
\r
- /* Are we interactive? */\r
- interactive = (wcscmp(lpStationName, L"WinSta0") == 0);\r
+ DebugEvent("Interactive %s", interactive ? "yes" : "no");\r
\r
/* Convert from Unicode to ANSI */\r
\r
DebugEvent("LookupAccountName obtained user %s sid in domain %s", acctname, pReferencedDomainName);\r
code = KFW_set_ccache_dacl_with_user_sid(filename, pUserSid);\r
\r
+#ifdef USE_WINLOGON_EVENT\r
/* If we are on Vista, setup a LogonScript \r
* that will execute the LogonEventHandler entry point via rundll32.exe \r
*/\r
if (is_windows_vista()) {\r
ConfigureLogonScript(lpLogonScript, filename);\r
if (*lpLogonScript)\r
- DebugEvent("LogonScript \"%s\"", *lpLogonScript);\r
+ DebugEvent0("LogonScript assigned");\r
else\r
DebugEvent0("No Logon Script");\r
-\r
}\r
+#else\r
+ ConfigureLogonScript(lpLogonScript, filename);\r
+ if (*lpLogonScript)\r
+ DebugEvent0("LogonScript assigned");\r
+ else \r
+ DebugEvent0("No Logon Script");\r
+#endif\r
} else {\r
DebugEvent0("LookupAccountName failed");\r
DeleteFile(filename);\r
\r
VOID KFW_Logon_Event( PWLX_NOTIFICATION_INFO pInfo )\r
{\r
+#ifdef USE_WINLOGON_EVENT\r
WCHAR szUserW[128] = L"";\r
char szUserA[128] = "";\r
char szPath[MAX_PATH] = "";\r
DeleteFile(newfilename);\r
\r
DebugEvent0("KFW_Logon_Event - End");\r
+#endif /* USE_WINLOGON_EVENT */\r
}\r
\r
\r