Browse Source

commit 42d001e3b4187cf27d973e323feebb5296499f2d
Author: Boris Shkolnik <borya@yahoo-inc.com>
Date: Thu Apr 22 10:13:04 2010 -0700

HADOOP:6716 from https://issues.apache.org/jira/secure/attachment/12442487/HADOOP-6716-BP20-3.patch

+++ b/YAHOO-CHANGES.txt
+ HADOOP-6716. System won't start in non-secure mode when kerb5.conf
+ (edu.mit.kerberos on Mac) is not present. (boryas)
+


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

Owen O'Malley 14 years ago
parent
commit
a9efff2411
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/core/org/apache/hadoop/security/KerberosName.java

+ 5 - 2
src/core/org/apache/hadoop/security/KerberosName.java

@@ -73,14 +73,17 @@ public class KerberosName {
   private static List<Rule> rules;
 
   private static String defaultRealm;
-  private static final Config kerbConf;
+  private static Config kerbConf;
   
   static {
     try {
       kerbConf = Config.getInstance();
       defaultRealm = kerbConf.getDefaultRealm();
     } catch (KrbException ke) {
-      throw new IllegalArgumentException("Can't get Kerberos configuration",ke);
+      if(UserGroupInformation.isSecurityEnabled())
+        throw new IllegalArgumentException("Can't get Kerberos configuration",ke);
+      else 
+        defaultRealm="";
     }
   }