You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by om...@apache.org on 2011/03/04 05:06:59 UTC

svn commit: r1077359 - /hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/UserGroupInformation.java

Author: omalley
Date: Fri Mar  4 04:06:59 2011
New Revision: 1077359

URL: http://svn.apache.org/viewvc?rev=1077359&view=rev
Log:
commit 5e4b5fbb2ae3b20cf479c154835bdb06a4092e80
Author: Owen O'Malley <om...@apache.org>
Date:   Tue Mar 23 09:21:45 2010 -0700

    HADOOP-6656. Renew Kerberos TGT when 80% of the renew lifetime has been
    used up. Include fix for NPE in capacity scheduler tests. (omalley)

Modified:
    hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/UserGroupInformation.java

Modified: hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/UserGroupInformation.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/UserGroupInformation.java?rev=1077359&r1=1077358&r2=1077359&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/UserGroupInformation.java (original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/UserGroupInformation.java Fri Mar  4 04:06:59 2011
@@ -511,8 +511,9 @@ public class UserGroupInformation {
   static void loginUserFromKeytab(String user,
                                   String path
                                   ) throws IOException {
-    if (!isSecurityEnabled())
+    if (!isSecurityEnabled()) {
       return;
+    }
 
     keytabFile = path;
     keytabPrincipal = user;
@@ -672,8 +673,8 @@ public class UserGroupInformation {
    * Did the login happen via keytab
    * @return true or false
    */
-  public synchronized static boolean isLoginKeytabBased() {
-    return loginUser.isKeytab;
+  public synchronized static boolean isLoginKeytabBased() throws IOException {
+    return getLoginUser().isKeytab;
   }
 
   /**