KFW: Vista Integrated Logon
authorJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 13 Mar 2007 06:35:13 +0000 (06:35 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 13 Mar 2007 06:35:13 +0000 (06:35 +0000)
        On Windows Vista the GINA architecture was removed.  As a side
        effect the support for the Logon Event Handlers was also removed.
        The KFW Integrated Logon functionality relies on the "Logon"
        event handler to migrate the user's tickets from a secure FILE:
        ccache to an API: ccache so that the tickets will be available
        to NetIDMgr and all other Kerberos applications.

        This functionality is especially important on Vista for
        accounts that are members of the Administrators group because
        the User Account Control (UAC) restricts access to the session
        keys of all tickets in the MSLSA ccache.  The only way for
        tickets to be made available to MIT Kerberos applications is
        by obtaining them within the Network Provider and pushing them
        into the Logon Session.

        This patch replaces the missing Logon Event Handler support
        with a new exported function "LogonEventHandler" which adheres
        to the rundll32.exe specifications.  The "LogonEventHandler"
        function accepts as input the name of a FILE ccache and moves
        the contents into an API: ccache and then deletes the FILE
        ccache.

        In order for this to work the FILE ccache must be owned by
        the account that was used to logon to the current session.
        The NPLogonNotify() function must therefore lookup the SID
        for the active account, assign an appropriate DACL to the
        ccache file, and change the owner.  In addition, when Vista
        is in use a LogonScript must be constructed that will perform
        the call to rundll32.exe.

        Other changes include altering the prototype of
        KFW_copy_ccache_system_file to accept a filename instead of
        the LogonID.  This improves the abstraction and allows the
        filename to be computed once and passed into multiple
        functions from NPLogonNotify().

        Many debugging calls were added to assist with implementation.
        #define DEBUG 1 at the top of kfwcommon.c when you wish to
        build with debugging that generates entries in the Windows
        Application Event Viewer.

It is important to note that Integrated Logon attempts to
logon the username within the default realm within the
krb5.ini file using the provided password.  This is so
a local machine account name matching the default realm
can obtain Kerberos tickets by synchronizing the password.

ticket: new
component: windows

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19221 dc483132-0cff-0310-8789-dd5450dbe970

src/windows/kfwlogon/kfwcommon.c
src/windows/kfwlogon/kfwlogon.c
src/windows/kfwlogon/kfwlogon.def
src/windows/kfwlogon/kfwlogon.h

index 14beef966bcc45e512f35314366bd66660cbe875..a3b02eeaba508c3a732f9cf8b2c40c0b4ed9f684 100644 (file)
@@ -1,5 +1,6 @@
 /*\r
 Copyright 2005,2006 by the Massachusetts Institute of Technology\r
+Copyright 2007 by Secure Endpoints Inc.\r
 \r
 All rights reserved.\r
 \r
@@ -778,6 +779,8 @@ int KFW_set_ccache_dacl(char *filename, HANDLE hUserToken)
        return 1;\r
     }\r
 \r
+    DebugEvent0("KFW_set_ccache_dacl");\r
+\r
     /* Get System SID */\r
     if (!ConvertStringSidToSid("S-1-5-18", &pSystemSID)) {\r
        DebugEvent("KFW_set_ccache_dacl - ConvertStringSidToSid GLE = 0x%x", GetLastError());\r
@@ -833,7 +836,7 @@ int KFW_set_ccache_dacl(char *filename, HANDLE hUserToken)
                                   ccacheACL,\r
                                   NULL)) {\r
            gle = GetLastError();\r
-           DebugEvent("SetNamedSecurityInfo DACL failed: GLE = 0x%lX", gle);\r
+           DebugEvent("SetNamedSecurityInfo DACL (1) failed: GLE = 0x%lX", gle);\r
            if (gle != ERROR_NO_TOKEN)\r
                ret = 1;\r
        }\r
@@ -844,7 +847,7 @@ int KFW_set_ccache_dacl(char *filename, HANDLE hUserToken)
                                   NULL,\r
                                   NULL)) {\r
            gle = GetLastError();\r
-           DebugEvent("SetNamedSecurityInfo DACL failed: GLE = 0x%lX", gle);\r
+           DebugEvent("SetNamedSecurityInfo OWNER (2) failed: GLE = 0x%lX", gle);\r
            if (gle != ERROR_NO_TOKEN)\r
                ret = 1;\r
        }\r
@@ -856,7 +859,7 @@ int KFW_set_ccache_dacl(char *filename, HANDLE hUserToken)
                                   ccacheACL,\r
                                   NULL)) {\r
            gle = GetLastError();\r
-           DebugEvent("SetNamedSecurityInfo DACL failed: GLE = 0x%lX", gle);\r
+           DebugEvent("SetNamedSecurityInfo DACL (3) failed: GLE = 0x%lX", gle);\r
            if (gle != ERROR_NO_TOKEN)\r
                ret = 1;\r
        }\r
@@ -872,6 +875,102 @@ int KFW_set_ccache_dacl(char *filename, HANDLE hUserToken)
     return ret;\r
 }\r
 \r
+int KFW_set_ccache_dacl_with_user_sid(char *filename, PSID pUserSID)\r
+{\r
+    // SID_IDENTIFIER_AUTHORITY authority = SECURITY_NT_SID_AUTHORITY;\r
+    PSID pSystemSID = NULL;\r
+    DWORD SystemSIDlength = 0, UserSIDlength = 0;\r
+    PACL ccacheACL = NULL;\r
+    DWORD ccacheACLlength = 0;\r
+    DWORD retLen;\r
+    DWORD gle;\r
+    int ret = 0;  \r
+\r
+    if (!filename) {\r
+       DebugEvent0("KFW_set_ccache_dacl_with_user_sid - invalid parms");\r
+       return 1;\r
+    }\r
+\r
+    DebugEvent0("KFW_set_ccache_dacl_with_user_sid");\r
+\r
+    /* Get System SID */\r
+    if (!ConvertStringSidToSid("S-1-5-18", &pSystemSID)) {\r
+       DebugEvent("KFW_set_ccache_dacl - ConvertStringSidToSid GLE = 0x%x", GetLastError());\r
+       ret = 1;\r
+       goto cleanup;\r
+    }\r
+\r
+    /* Create ACL */\r
+    SystemSIDlength = GetLengthSid(pSystemSID);\r
+    ccacheACLlength = sizeof(ACL) + sizeof(ACCESS_ALLOWED_ACE)\r
+        + SystemSIDlength - sizeof(DWORD);\r
+\r
+    if (pUserSID) {\r
+       UserSIDlength = GetLengthSid(pUserSID);\r
+\r
+       ccacheACLlength += sizeof(ACCESS_ALLOWED_ACE) + UserSIDlength \r
+           - sizeof(DWORD);\r
+    }\r
+\r
+    ccacheACL = (PACL) LocalAlloc(LPTR, ccacheACLlength);\r
+    if (!ccacheACL) {\r
+       DebugEvent("KFW_set_ccache_dacl - LocalAlloc GLE = 0x%x", GetLastError());\r
+       ret = 1;\r
+       goto cleanup;\r
+    }\r
+\r
+    InitializeAcl(ccacheACL, ccacheACLlength, ACL_REVISION);\r
+    AddAccessAllowedAceEx(ccacheACL, ACL_REVISION, 0,\r
+                         STANDARD_RIGHTS_ALL | SPECIFIC_RIGHTS_ALL,\r
+                         pSystemSID);\r
+    if (pUserSID) {\r
+       AddAccessAllowedAceEx(ccacheACL, ACL_REVISION, 0,\r
+                            STANDARD_RIGHTS_ALL | SPECIFIC_RIGHTS_ALL,\r
+                            pUserSID);\r
+       if (!SetNamedSecurityInfo( filename, SE_FILE_OBJECT,\r
+                                  DACL_SECURITY_INFORMATION | PROTECTED_DACL_SECURITY_INFORMATION,\r
+                                  NULL,\r
+                                  NULL, \r
+                                  ccacheACL,\r
+                                  NULL)) {\r
+           gle = GetLastError();\r
+           DebugEvent("SetNamedSecurityInfo DACL (4) failed: GLE = 0x%lX", gle);\r
+           if (gle != ERROR_NO_TOKEN)\r
+               ret = 1;\r
+       }\r
+       if (!SetNamedSecurityInfo( filename, SE_FILE_OBJECT,\r
+                                  OWNER_SECURITY_INFORMATION,\r
+                                  pUserSID,\r
+                                  NULL, \r
+                                  NULL,\r
+                                  NULL)) {\r
+           gle = GetLastError();\r
+           DebugEvent("SetNamedSecurityInfo OWNER (5) failed: GLE = 0x%lX", gle);\r
+           if (gle != ERROR_NO_TOKEN)\r
+               ret = 1;\r
+       }\r
+    } else {\r
+       if (!SetNamedSecurityInfo( filename, SE_FILE_OBJECT,\r
+                                  DACL_SECURITY_INFORMATION | PROTECTED_DACL_SECURITY_INFORMATION,\r
+                                  NULL,\r
+                                  NULL, \r
+                                  ccacheACL,\r
+                                  NULL)) {\r
+           gle = GetLastError();\r
+           DebugEvent("SetNamedSecurityInfo DACL (6) failed: GLE = 0x%lX", gle);\r
+           if (gle != ERROR_NO_TOKEN)\r
+               ret = 1;\r
+       }\r
+    }\r
+\r
+  cleanup:\r
+    if (pSystemSID)\r
+       LocalFree(pSystemSID);\r
+    if (ccacheACL)\r
+       LocalFree(ccacheACL);\r
+    return ret;\r
+}\r
+\r
 int KFW_obtain_user_temp_directory(HANDLE hUserToken, char *newfilename, int size)\r
 {\r
     int  retval = 0;\r
@@ -894,9 +993,8 @@ int KFW_obtain_user_temp_directory(HANDLE hUserToken, char *newfilename, int siz
 }\r
 \r
 void\r
-KFW_copy_cache_to_system_file(char * user, char * szLogonId)\r
+KFW_copy_cache_to_system_file(char * user, char * filename)\r
 {\r
-    char filename[MAX_PATH] = "";\r
     DWORD count;\r
     char cachename[MAX_PATH + 8] = "FILE:";\r
     krb5_context               ctx = 0;\r
@@ -906,24 +1004,11 @@ KFW_copy_cache_to_system_file(char * user, char * szLogonId)
     krb5_ccache                 ncc = 0;\r
     PSECURITY_ATTRIBUTES        pSA = NULL;\r
     \r
-    if (!pkrb5_init_context || !user || !szLogonId)\r
+    if (!pkrb5_init_context || !user || !filename)\r
         return;\r
 \r
-    count = GetEnvironmentVariable("TEMP", filename, sizeof(filename));\r
-    if ( count > sizeof(filename) || count == 0 ) {\r
-        GetWindowsDirectory(filename, sizeof(filename));\r
-    }\r
-\r
-    DebugEvent0(filename);\r
-    if ( strlen(filename) + strlen(szLogonId) + 2 > sizeof(filename) ) {\r
-       DebugEvent0("filename buffer too small");\r
-        return;\r
-    }\r
-\r
-    strcat(filename, "\\");\r
-    strcat(filename, szLogonId);    \r
-\r
-    strcat(cachename, filename);\r
+    strncat(cachename, filename, sizeof(cachename));\r
+    cachename[sizeof(cachename)-1] = '\0';\r
 \r
     DebugEvent("KFW_Logon_Event - ccache %s", cachename);\r
 \r
index 6dcd998708a73a511794995c3ef6b560e6882825..3974a2ca774b754e973dc040421976c8cf0c7951 100644 (file)
@@ -1,5 +1,6 @@
 /*\r
 Copyright 2005,2006 by the Massachusetts Institute of Technology\r
+Copyright 2007 by Secure Endpoints Inc.\r
 \r
 All rights reserved.\r
 \r
@@ -25,6 +26,7 @@ SOFTWARE.
 #include "kfwlogon.h"\r
 \r
 #include <io.h>\r
+#include <stdio.h>\r
 #include <sys/stat.h>\r
 #include <sys/types.h>\r
 #include <fcntl.h>\r
@@ -107,6 +109,75 @@ UnicodeStringToANSI(UNICODE_STRING uInputString, LPSTR lpszOutputString, int nOu
 }  // UnicodeStringToANSI\r
 \r
 \r
+static BOOL\r
+is_windows_vista(void)\r
+{\r
+   static BOOL fChecked = FALSE;\r
+   static BOOL fIsWinVista = FALSE;\r
+\r
+   if (!fChecked)\r
+   {\r
+       OSVERSIONINFO Version;\r
+\r
+       memset (&Version, 0x00, sizeof(Version));\r
+       Version.dwOSVersionInfoSize = sizeof(Version);\r
+\r
+       if (GetVersionEx (&Version))\r
+       {\r
+           if (Version.dwPlatformId == VER_PLATFORM_WIN32_NT &&\r
+               Version.dwMajorVersion >= 6)\r
+               fIsWinVista = TRUE;\r
+       }\r
+       fChecked = TRUE;\r
+   }\r
+\r
+   return fIsWinVista;\r
+}\r
+\r
+/* Construct a Logon Script that will cause the LogonEventHandler to be executed\r
+ * under in the logon session \r
+ */\r
+VOID \r
+ConfigureLogonScript(LPWSTR *lpLogonScript, char * filename) {\r
+    DWORD dwLogonScriptLen;\r
+    LPWSTR lpScript;\r
+    LPSTR lpTemp;\r
+    \r
+    if (!lpLogonScript)\r
+       return;\r
+    *lpLogonScript = NULL;\r
+\r
+    if (!filename)\r
+       return;\r
+\r
+    dwLogonScriptLen = strlen("rundll32.exe kfwlogon.dll,LogonEventHandler ") + strlen(filename) + 1;\r
+    lpTemp = (LPSTR) malloc(dwLogonScriptLen); \r
+    if (!lpTemp)\r
+       return;\r
+\r
+    _snprintf(lpTemp, dwLogonScriptLen, \r
+            "rundll32.exe kfwlogon.dll,LogonEventHandler %s",\r
+            filename);\r
+\r
+    SetLastError(0);\r
+    dwLogonScriptLen = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, lpTemp, strlen(lpTemp), NULL, 0);\r
+    DebugEvent("ConfigureLogonScript %s requires %d bytes gle=0x%x", lpTemp, dwLogonScriptLen, GetLastError());\r
+\r
+    lpScript = LocalAlloc(LMEM_ZEROINIT, dwLogonScriptLen * 2);\r
+    if (lpScript) {\r
+       if (MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, lpTemp, strlen(lpTemp), \r
+                                lpScript, 2 * dwLogonScriptLen))\r
+           *lpLogonScript = lpScript;\r
+       else {\r
+           DebugEvent("ConfigureLogonScript - MultiByteToWideChar failed gle = 0x%x", GetLastError());\r
+           LocalFree(lpScript);\r
+       }\r
+    } else {\r
+       DebugEvent("LocalAlloc failed gle=0x%x", GetLastError());\r
+    }\r
+    free(lpTemp);\r
+}\r
+\r
 DWORD APIENTRY NPLogonNotify(\r
        PLUID lpLogonId,\r
        LPCWSTR lpAuthentInfoType,\r
@@ -117,10 +188,9 @@ DWORD APIENTRY NPLogonNotify(
        LPVOID StationHandle,\r
        LPWSTR *lpLogonScript)\r
 {\r
-    char uname[MAX_USERNAME_LENGTH]="";\r
-    char password[MAX_PASSWORD_LENGTH]="";\r
-    char logonDomain[MAX_DOMAIN_LENGTH]="";\r
-    char szLogonId[128] = "";\r
+    char uname[MAX_USERNAME_LENGTH+1]="";\r
+    char password[MAX_PASSWORD_LENGTH+1]="";\r
+    char logonDomain[MAX_DOMAIN_LENGTH+1]="";\r
 \r
     MSV1_0_INTERACTIVE_LOGON *IL;\r
 \r
@@ -187,8 +257,86 @@ DWORD APIENTRY NPLogonNotify(
      * for this user \r
      */\r
     if (!code) {\r
-       sprintf(szLogonId,"kfwlogon-%d.%d",lpLogonId->HighPart, lpLogonId->LowPart);\r
-       KFW_copy_cache_to_system_file(uname, szLogonId);\r
+       char filename[MAX_PATH+1] = "";\r
+       char acctname[MAX_USERNAME_LENGTH+MAX_DOMAIN_LENGTH+3]="";\r
+       PSID pUserSid = NULL;\r
+       LPTSTR pReferencedDomainName = NULL;\r
+       DWORD dwSidLen = 0, dwDomainLen = 0, count;\r
+       SID_NAME_USE eUse;\r
+\r
+       if (_snprintf(acctname, sizeof(acctname), "%s\\%s", logonDomain, uname) < 0) {\r
+           code = -1;\r
+           goto cleanup;\r
+       }\r
+\r
+       count = GetEnvironmentVariable("TEMP", filename, sizeof(filename));\r
+       if ( count > sizeof(filename) || count == 0 ) {\r
+           GetWindowsDirectory(filename, sizeof(filename));\r
+       }\r
+\r
+       if (_snprintf(filename, sizeof(filename), "%s\\kfwlogon-%d.%d",\r
+                      filename, lpLogonId->HighPart, lpLogonId->LowPart) < 0) \r
+       {\r
+           code = -1;\r
+           goto cleanup;\r
+       }\r
+\r
+       KFW_copy_cache_to_system_file(uname, filename);\r
+\r
+       /* Need to determine the SID */\r
+\r
+       /* First get the size of the required buffers */\r
+       LookupAccountName (NULL,\r
+                          acctname,\r
+                          pUserSid,\r
+                          &dwSidLen,\r
+                          pReferencedDomainName,\r
+                          &dwDomainLen,\r
+                          &eUse);\r
+       if(dwSidLen){\r
+           pUserSid = (PSID) malloc (dwSidLen);\r
+           memset(pUserSid,0,dwSidLen);\r
+       }\r
+\r
+       if(dwDomainLen){\r
+           pReferencedDomainName = (LPTSTR) malloc (dwDomainLen * sizeof(TCHAR));\r
+           memset(pReferencedDomainName,0,dwDomainLen * sizeof(TCHAR));\r
+       }\r
\r
+       //Now get the SID and the domain name\r
+       if (pUserSid && LookupAccountName( NULL,\r
+                                          acctname,\r
+                                          pUserSid,\r
+                                          &dwSidLen,\r
+                                          pReferencedDomainName,\r
+                                          &dwDomainLen,\r
+                                          &eUse)) \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
+           /* 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
+               else\r
+                   DebugEvent0("No Logon Script");\r
+\r
+           }\r
+       } else {\r
+           DebugEvent0("LookupAccountName failed");\r
+           DeleteFile(filename);\r
+           code = -1;\r
+       }\r
+\r
+      cleanup:\r
+       if (pUserSid)\r
+           free(pUserSid);\r
+       if (pReferencedDomainName)\r
+           free(pReferencedDomainName);\r
     }\r
 \r
     KFW_destroy_tickets_for_principal(uname);\r
@@ -202,8 +350,7 @@ DWORD APIENTRY NPLogonNotify(
 \r
         h = RegisterEventSource(NULL, KFW_LOGON_EVENT_NAME);\r
         ptbuf[0] = msg;\r
-        ReportEvent(h, EVENTLOG_WARNING_TYPE, 0, 1008, NULL,\r
-                     1, 0, ptbuf, NULL);\r
+        ReportEvent(h, EVENTLOG_WARNING_TYPE, 0, 1008, NULL, 1, 0, ptbuf, NULL);\r
         DeregisterEventSource(h);\r
         SetLastError(code);\r
     }\r
@@ -312,7 +459,7 @@ VOID KFW_Logon_Event( PWLX_NOTIFICATION_INFO pInfo )
         LogonId = pLogonSessionData->LogonId;\r
         DebugEvent("KFW_Logon_Event - LogonId(%d,%d)", LogonId.HighPart, LogonId.LowPart);\r
 \r
-        sprintf(szLogonId,"kfwlogon-%d.%d",LogonId.HighPart, LogonId.LowPart);\r
+        _snprintf(szLogonId, sizeof(szLogonId), "kfwlogon-%d.%d",LogonId.HighPart, LogonId.LowPart);\r
         LsaFreeReturnBuffer( pLogonSessionData );\r
     } else {\r
         DebugEvent0("KFW_Logon_Event - Unable to determine LogonId");\r
@@ -365,7 +512,7 @@ VOID KFW_Logon_Event( PWLX_NOTIFICATION_INFO pInfo )
        return;\r
     }\r
 \r
-    sprintf(commandline, "kfwcpcc.exe \"%s\"", newfilename);\r
+    _snprintf(commandline, sizeof(commandline), "kfwcpcc.exe \"%s\"", newfilename);\r
 \r
     GetStartupInfo(&startupinfo);\r
     if (CreateProcessAsUser( pInfo->hToken,\r
@@ -390,8 +537,60 @@ VOID KFW_Logon_Event( PWLX_NOTIFICATION_INFO pInfo )
        DebugEvent0("KFW_Logon_Event - CreateProcessFailed");\r
     }\r
 \r
-    DeleteFile(filename);\r
+    DeleteFile(newfilename);\r
 \r
     DebugEvent0("KFW_Logon_Event - End");\r
 }\r
 \r
+\r
+/* Documentation on the use of RunDll32 entrypoints can be found \r
+ * at http://support.microsoft.com/kb/164787 \r
+ */\r
+void CALLBACK\r
+LogonEventHandlerA(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow)\r
+{\r
+    HANDLE hf = NULL;\r
+    char commandline[MAX_PATH+256] = "";\r
+    STARTUPINFO startupinfo;\r
+    PROCESS_INFORMATION procinfo;\r
+\r
+    DebugEvent0("LogonEventHandler - Start");\r
+\r
+    /* Validate lpszCmdLine as a file */\r
+    hf = CreateFile(lpszCmdLine, FILE_ALL_ACCESS, 0, NULL, OPEN_EXISTING, \r
+                   FILE_ATTRIBUTE_NORMAL, NULL);\r
+    if (hf == INVALID_HANDLE_VALUE) {\r
+        DebugEvent0("LogonEventHandler - file cannot be opened");\r
+       return;\r
+    }\r
+    CloseHandle(hf);\r
+\r
+\r
+    _snprintf(commandline, sizeof(commandline), "kfwcpcc.exe \"%s\"", lpszCmdLine);\r
+\r
+    GetStartupInfo(&startupinfo);\r
+    if (CreateProcess( "kfwcpcc.exe",\r
+                      commandline,\r
+                      NULL,\r
+                      NULL,\r
+                      FALSE,\r
+                      CREATE_NEW_PROCESS_GROUP | DETACHED_PROCESS,\r
+                      NULL,\r
+                      NULL,\r
+                      &startupinfo,\r
+                      &procinfo)) \r
+    {\r
+       DebugEvent("KFW_Logon_Event - CommandLine %s", commandline);\r
+\r
+       WaitForSingleObject(procinfo.hProcess, 30000);\r
+\r
+       CloseHandle(procinfo.hThread);\r
+       CloseHandle(procinfo.hProcess);\r
+    } else {\r
+       DebugEvent0("KFW_Logon_Event - CreateProcessFailed");\r
+    }\r
+\r
+    DeleteFile(lpszCmdLine);\r
+\r
+    DebugEvent0("KFW_Logon_Event - End");\r
+}\r
index 52af990907eab169a4d57649ca4f752272db8852..05e5b3b1dbe65f2a607eeaaefc15fab015bf3aa6 100644 (file)
@@ -7,6 +7,8 @@ EXPORTS
     NPLogonNotify\r
     NPPasswordChangeNotify\r
     KFW_Logon_Event\r
+    LogonEventHandlerA\r
+\r
 \r
 \r
 \r
index d3fa6709d648997945cbae9a55080e8d8e7d80cd..a542b81c3ddf0008e4cb430fb4b08ae308f06316 100644 (file)
@@ -1,6 +1,7 @@
 /*\r
 \r
 Copyright 2005,2006 by the Massachusetts Institute of Technology\r
+Copyright 2007 by Secure Endpoints Inc.\r
 \r
 All rights reserved.\r
 \r
@@ -192,11 +193,14 @@ static BOOL WINAPI UnicodeStringToANSI(UNICODE_STRING uInputString, LPSTR lpszOu
 \r
 int KFW_is_available(void);\r
 int KFW_get_cred( char * username, char * password, int lifetime, char ** reasonP );\r
-void KFW_copy_cache_to_system_file(char * user, char * szLogonId);\r
+void KFW_copy_cache_to_system_file(const char * user, const char * filename);\r
 int KFW_destroy_tickets_for_principal(char * user);\r
 int KFW_set_ccache_dacl(char *filename, HANDLE hUserToken);\r
+int KFW_set_ccache_dacl_with_user_sid(char *filename, PSID pUserSID);\r
 int KFW_obtain_user_temp_directory(HANDLE hUserToken, char *newfilename, int size);\r
 \r
+void CALLBACK LogonEventHandlerA(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow);\r
+\r
 #ifdef __cplusplus\r
 }\r
 #endif\r