From c81fab0f50ec79beaa64c72171cee264afed4298 Mon Sep 17 00:00:00 2001 From: mguessan Date: Thu, 28 Mar 2013 23:13:35 +0000 Subject: [PATCH] Kerberos read KRB5CCNAME environment variable to set ticket cache path git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2074 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/http/KerberosLoginConfiguration.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/java/davmail/http/KerberosLoginConfiguration.java b/src/java/davmail/http/KerberosLoginConfiguration.java index 307ccfcb..8a7a19ae 100644 --- a/src/java/davmail/http/KerberosLoginConfiguration.java +++ b/src/java/davmail/http/KerberosLoginConfiguration.java @@ -49,6 +49,10 @@ public class KerberosLoginConfiguration extends Configuration { clientLoginModuleOptions.put("useTicketCache", "true"); clientLoginModuleOptions.put("renewTGT", "true"); //clientLoginModuleOptions.put("doNotPrompt", "true"); + String krb5ccName = System.getenv().get("KRB5CCNAME"); + if (krb5ccName != null && krb5ccName.length() > 0) { + clientLoginModuleOptions.put("ticketCache", krb5ccName); + } //clientLoginModuleOptions.put("ticketCache", FileCredentialsCache.getDefaultCacheName()); //clientLoginModuleOptions.put("refreshKrb5Config", "true"); //clientLoginModuleOptions.put("storeKey", "true");