64-bit Windows krb5int_cc_default calls to Leash
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 5 Sep 2007 22:48:06 +0000 (22:48 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 5 Sep 2007 22:48:06 +0000 (22:48 +0000)
AMD64 builds must load leashw64.dll not leashw32.dll

ticket:new

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

src/lib/krb5/ccache/ccdefault.c

index f256bfd0885af6b901e68a3d726f68506dc425e9..b7a592f74ad70492f072349670563b783fc40a17 100644 (file)
 #elif defined(USE_LEASH)
 static void (*pLeash_AcquireInitialTicketsIfNeeded)(krb5_context,krb5_principal,char*,int) = NULL;
 static HANDLE hLeashDLL = INVALID_HANDLE_VALUE;
+#ifdef _WIN64
+#define LEASH_DLL "leashw64.dll"
+#else
+#define LEASH_DLL "leashw32.dll"
+#endif
 #endif
 
 
@@ -86,7 +91,7 @@ krb5int_cc_default(krb5_context context, krb5_ccache *ccache)
 #else
 #ifdef USE_LEASH
     if ( hLeashDLL == INVALID_HANDLE_VALUE ) {
-        hLeashDLL = LoadLibrary("leashw32.dll");
+        hLeashDLL = LoadLibrary(LEASH_DLL);
         if ( hLeashDLL != INVALID_HANDLE_VALUE ) {
             (FARPROC) pLeash_AcquireInitialTicketsIfNeeded =
             GetProcAddress(hLeashDLL, "not_an_API_Leash_AcquireInitialTicketsIfNeeded");