Selaa lähdekoodia

commit 5e4b5fbb2ae3b20cf479c154835bdb06a4092e80
Author: Owen O'Malley <omalley@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)


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-patches@1077359 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 14 vuotta sitten
vanhempi
commit
ff2d95f7e7
1 muutettua tiedostoa jossa 4 lisäystä ja 3 poistoa
  1. 4 3
      src/core/org/apache/hadoop/security/UserGroupInformation.java

+ 4 - 3
src/core/org/apache/hadoop/security/UserGroupInformation.java

@@ -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;
   }
 
   /**