ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhangqi...@apache.org
Subject ranger git commit: RANGER-1863:Optimize the code and keep the code style consistent, remove the invalid code in the RemoteUnixLoginModule class
Date Fri, 03 Nov 2017 08:22:12 GMT
Repository: ranger
Updated Branches:
  refs/heads/master 4c1e80e6b -> 45f40277c


RANGER-1863:Optimize the code and keep the code style consistent, remove the invalid code
in the RemoteUnixLoginModule class

Signed-off-by: zhangqiang2 <zhangqiang2@zte.com.cn>


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

Branch: refs/heads/master
Commit: 45f40277c996ea754eb7efb995e73efaec311394
Parents: 4c1e80e
Author: peng.jianhua <peng.jianhua@zte.com.cn>
Authored: Mon Oct 30 11:31:46 2017 +0800
Committer: zhangqiang2 <zhangqiang2@zte.com.cn>
Committed: Fri Nov 3 04:21:00 2017 -0400

----------------------------------------------------------------------
 .../unix/jaas/RemoteUnixLoginModule.java        | 23 ++------------------
 1 file changed, 2 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/45f40277/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/RemoteUnixLoginModule.java
----------------------------------------------------------------------
diff --git a/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/RemoteUnixLoginModule.java
b/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/RemoteUnixLoginModule.java
index ff296b4..40cc51e 100644
--- a/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/RemoteUnixLoginModule.java
+++ b/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/RemoteUnixLoginModule.java
@@ -133,31 +133,12 @@ public class RemoteUnixLoginModule implements LoginModule {
 			this.callbackHandler = new ConsolePromptCallbackHandler();
 		}
 
-		/*
-		Properties config = null;
-
-		String val = (String) options.get(REMOTE_UNIX_AUTHENICATION_CONFIG_FILE_PARAM);
-		log("Remote Unix Auth Configuration file [" + val + "]");
-		if (val != null) {
-			XMLUtils.loadConfig(val, config);
-		}
-		
-		if (config == null) {
-			logError("Remote Unix Auth Configuration is being loaded from XML configuration - not
Properties");
-			config = new Properties();
-			config.putAll(options);
-		}
-		
-		*/
-		
 		Properties config = new Properties();
 		config.putAll(options);
 		initParams(config);
 		
 	}
 	
-	
-	
 	public void initParams(Properties  options) {
 		
 		String val = (String) options.get(JAAS_ENABLED_PARAM);
@@ -165,7 +146,7 @@ public class RemoteUnixLoginModule implements LoginModule {
 		if (val != null) {
 			remoteLoginEnabled = val.trim().equalsIgnoreCase("true");
 			if (! remoteLoginEnabled) {
-				System.err.println("Skipping RemoteLogin - [" + JAAS_ENABLED_PARAM + "] => [" + val
+ "]");
+				log("Skipping RemoteLogin - [" + JAAS_ENABLED_PARAM + "] => [" + val + "]");
 				return;
 			}
 		}
@@ -218,7 +199,7 @@ public class RemoteUnixLoginModule implements LoginModule {
 			}
 			
 			String certValidationFlag = (String) options.get(SERVER_CERT_VALIDATION_PARAM);
-			serverCertValidation = (! (certValidationFlag != null && ("false".equalsIgnoreCase(certValidationFlag.trim().toLowerCase()))));
+			serverCertValidation = (! (certValidationFlag != null && ("false".equalsIgnoreCase(certValidationFlag.trim()))));
 			log("Server Cert Validation : " + serverCertValidation);
 		}
 


Mime
View raw message