diff --git a/CHANGES.txt b/CHANGES.txt index bb5c19cdee..8d8914086f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -119,6 +119,9 @@ Trunk (unreleased changes) HADOOP-6495. Identifier should be serialized after the password is created In Token constructor (jnp via boryas) + HADOOP-6518. Makes the UGI honor the env var KRB5CCNAME. + (Owen O'Malley via ddas) + OPTIMIZATIONS BUG FIXES diff --git a/src/java/org/apache/hadoop/security/UserGroupInformation.java b/src/java/org/apache/hadoop/security/UserGroupInformation.java index b3eab89c59..adc03617b7 100644 --- a/src/java/org/apache/hadoop/security/UserGroupInformation.java +++ b/src/java/org/apache/hadoop/security/UserGroupInformation.java @@ -241,6 +241,10 @@ private static class HadoopConfiguration static { USER_KERBEROS_OPTIONS.put("doNotPrompt", "true"); USER_KERBEROS_OPTIONS.put("useTicketCache", "true"); + String ticketCache = System.getenv("KRB5CCNAME"); + if (ticketCache != null) { + USER_KERBEROS_OPTIONS.put("ticketCache", ticketCache); + } } private static final AppConfigurationEntry USER_KERBEROS_LOGIN = new AppConfigurationEntry(Krb5LoginModule.class.getName(),