+2004-07-07 Jeffrey Altman <jaltman@mit.edu>
+
+ * cc_mslsa.c: Fix thread safety
+
2004-07-07 Jeffrey Altman <jaltman@mit.edu>
* cc_mslsa.c: When obtaining a TGT from MSLSA, do not ignore
#define MAX_MSG_SIZE 256
#define MAX_MSPRINC_SIZE 1024
+/* THREAD SAFETY
+ * The functions is_windows_2000(), is_windows_xp(), and does_retrieve_ticket_cache_ticket()
+ * contain static variables to cache the responses of the tests being performed. There is
+ * no harm in the test being performed more than once since the result will always be the
+ * same.
+ */
+
static BOOL
is_windows_2000 (void)
{
if (!fChecked)
{
OSVERSIONINFO Version;
- fChecked = TRUE;
memset (&Version, 0x00, sizeof(Version));
Version.dwOSVersionInfoSize = sizeof(Version);
Version.dwMajorVersion >= 5)
fIsWin2K = TRUE;
}
+ fChecked = TRUE;
}
return fIsWin2K;
if (!fChecked)
{
OSVERSIONINFO Version;
- fChecked = TRUE;
memset (&Version, 0x00, sizeof(Version));
Version.dwOSVersionInfoSize = sizeof(Version);
Version.dwMajorVersion == 5 && Version.dwMinorVersion >= 1) )
fIsWinXP = TRUE;
}
+ fChecked = TRUE;
}
return fIsWinXP;
PKERB_RETRIEVE_TKT_RESPONSE pTicketResponse = NULL;
ULONG ResponseSize;
- fChecked = TRUE;
RequestSize = sizeof(*pTicketRequest) + 1;
if (!PackageConnectLookup(&LogonHandle, &PackageId))
if ( SubStatus == STATUS_NOT_SUPPORTED )
fCachesTicket = TRUE;
}
+ fChecked = TRUE;
}
return fCachesTicket;