You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by zh...@apache.org on 2017/08/24 00:44:00 UTC
ranger git commit: RANGER-1744:Similar to RANGER-1541,
the assignment logic is inconsistent for the value of the
RANGER_ADMIN_HOME variable in changeusernameutil.py and
changepasswordutil.py. It will cause a serious failure.
Repository: ranger
Updated Branches:
refs/heads/master 5318e2f5f -> 5fc9ee1f9
RANGER-1744:Similar to RANGER-1541, the assignment logic is inconsistent for the value of the RANGER_ADMIN_HOME variable in changeusernameutil.py and changepasswordutil.py. It will cause a serious failure.
Signed-off-by: zhangqiang2 <zh...@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/5fc9ee1f
Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/5fc9ee1f
Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/5fc9ee1f
Branch: refs/heads/master
Commit: 5fc9ee1f9a41d2dd73dad1dc9e32fbfaa38872a6
Parents: 5318e2f
Author: zhangqiang2 <zh...@zte.com.cn>
Authored: Mon Aug 21 09:56:51 2017 -0400
Committer: zhangqiang2 <zh...@zte.com.cn>
Committed: Wed Aug 23 20:43:34 2017 -0400
----------------------------------------------------------------------
security-admin/scripts/changepasswordutil.py | 9 +++------
security-admin/scripts/changeusernameutil.py | 9 +++------
2 files changed, 6 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ranger/blob/5fc9ee1f/security-admin/scripts/changepasswordutil.py
----------------------------------------------------------------------
diff --git a/security-admin/scripts/changepasswordutil.py b/security-admin/scripts/changepasswordutil.py
index 3086962..95bd613 100644
--- a/security-admin/scripts/changepasswordutil.py
+++ b/security-admin/scripts/changepasswordutil.py
@@ -32,12 +32,9 @@ from datetime import datetime
os_name = platform.system()
os_name = os_name.upper()
-if os_name == "LINUX":
- RANGER_ADMIN_HOME = os.getenv("RANGER_ADMIN_HOME")
- if RANGER_ADMIN_HOME is None:
- RANGER_ADMIN_HOME = os.getcwd()
-elif os_name == "WINDOWS":
- RANGER_ADMIN_HOME = os.getenv("RANGER_ADMIN_HOME")
+RANGER_ADMIN_HOME = os.getenv("RANGER_ADMIN_HOME")
+if RANGER_ADMIN_HOME is None:
+ RANGER_ADMIN_HOME = os.getcwd()
def log(msg,type):
if type == 'info':
http://git-wip-us.apache.org/repos/asf/ranger/blob/5fc9ee1f/security-admin/scripts/changeusernameutil.py
----------------------------------------------------------------------
diff --git a/security-admin/scripts/changeusernameutil.py b/security-admin/scripts/changeusernameutil.py
index 7216bbc..cb471f0 100644
--- a/security-admin/scripts/changeusernameutil.py
+++ b/security-admin/scripts/changeusernameutil.py
@@ -32,12 +32,9 @@ from datetime import datetime
os_name = platform.system()
os_name = os_name.upper()
-if os_name == "LINUX":
- RANGER_ADMIN_HOME = os.getenv("RANGER_ADMIN_HOME")
- if RANGER_ADMIN_HOME is None:
- RANGER_ADMIN_HOME = os.getcwd()
-elif os_name == "WINDOWS":
- RANGER_ADMIN_HOME = os.getenv("RANGER_ADMIN_HOME")
+RANGER_ADMIN_HOME = os.getenv("RANGER_ADMIN_HOME")
+if RANGER_ADMIN_HOME is None:
+ RANGER_ADMIN_HOME = os.getcwd()
def log(msg,type):
if type == 'info':