ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/2] ranger git commit: RANGER-1353
Date Tue, 07 Feb 2017 09:59:14 GMT
Repository: ranger
Updated Branches:
  refs/heads/master 70fc18099 -> 701a368ad


RANGER-1353

Signed-off-by: Colm O hEigeartaigh <coheigea@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/4dc8cc0b
Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/4dc8cc0b
Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/4dc8cc0b

Branch: refs/heads/master
Commit: 4dc8cc0b763779ee6a0f589285e7dd9d95391038
Parents: 70fc180
Author: zhangqiang2 <zhangqiang2@zte.com.cn>
Authored: Mon Feb 6 16:14:39 2017 +0800
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Tue Feb 7 09:53:24 2017 +0000

----------------------------------------------------------------------
 .../java/org/apache/ranger/server/tomcat/EmbeddedServer.java    | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/4dc8cc0b/embeddedwebserver/src/main/java/org/apache/ranger/server/tomcat/EmbeddedServer.java
----------------------------------------------------------------------
diff --git a/embeddedwebserver/src/main/java/org/apache/ranger/server/tomcat/EmbeddedServer.java
b/embeddedwebserver/src/main/java/org/apache/ranger/server/tomcat/EmbeddedServer.java
index 54c190d..92e7d16 100644
--- a/embeddedwebserver/src/main/java/org/apache/ranger/server/tomcat/EmbeddedServer.java
+++ b/embeddedwebserver/src/main/java/org/apache/ranger/server/tomcat/EmbeddedServer.java
@@ -50,6 +50,7 @@ public class EmbeddedServer {
 	
 	private static final Logger LOG = Logger.getLogger(EmbeddedServer.class
 			.getName());
+	private static final String DEFAULT_NAME_RULE = "DEFAULT";
 	
 	private static final String DEFAULT_CONFIG_FILENAME = "ranger-admin-site.xml";
 	private static final String CORE_SITE_CONFIG_FILENAME = "core-site.xml";
@@ -223,6 +224,10 @@ public class EmbeddedServer {
 				LOG.warning("Failed to get ranger.admin.kerberos.principal. Reason: " + ignored.toString());
 			}
 			String nameRules = getConfig(ADMIN_NAME_RULES);
+			if(nameRules == null || nameRules.length() == 0){
+				LOG.info("Name is empty. Setting Name Rule as 'DEFAULT'");
+				nameRules = DEFAULT_NAME_RULE;
+			}
 			if (getConfig(AUTHENTICATION_TYPE) != null
 					&& getConfig(AUTHENTICATION_TYPE).trim().equalsIgnoreCase(AUTH_TYPE_KERBEROS)
 					&& SecureClientLogin.isKerberosCredentialExists(principal,keytab)) {


Mime
View raw message