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/23 01:41:33 UTC
ranger git commit: RANGER-1743:Comment lines have not been filtered
out when the populate_global_dict function parsed install.properties in
security-admin/scripts/restrict_permissions.py. Like RANGER-1284,
we should modify it.
Repository: ranger
Updated Branches:
refs/heads/master a9523814c -> b676cd920
RANGER-1743:Comment lines have not been filtered out when the populate_global_dict function parsed install.properties in security-admin/scripts/restrict_permissions.py. Like RANGER-1284, we should modify it.
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/b676cd92
Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/b676cd92
Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/b676cd92
Branch: refs/heads/master
Commit: b676cd920cc64e6e8d286f231a714a65f93031ef
Parents: a952381
Author: peng.jianhua <pe...@zte.com.cn>
Authored: Sun Aug 20 09:48:13 2017 -0400
Committer: zhangqiang2 <zh...@zte.com.cn>
Committed: Tue Aug 22 21:40:50 2017 -0400
----------------------------------------------------------------------
security-admin/scripts/restrict_permissions.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ranger/blob/b676cd92/security-admin/scripts/restrict_permissions.py
----------------------------------------------------------------------
diff --git a/security-admin/scripts/restrict_permissions.py b/security-admin/scripts/restrict_permissions.py
index a4998be..1ce54a5 100644
--- a/security-admin/scripts/restrict_permissions.py
+++ b/security-admin/scripts/restrict_permissions.py
@@ -55,9 +55,13 @@ def populate_global_dict():
global globalDict
read_config_file = open(os.path.join(os.getcwd(),'install.properties'))
for each_line in read_config_file.read().split('\n') :
- if len(each_line) == 0 : continue
+ each_line = each_line.strip();
+ if len(each_line) == 0:
+ continue
+ elif each_line[0] == "#":
+ continue
if re.search('=', each_line):
- key , value = each_line.strip().split("=",1)
+ key , value = each_line.split("=",1)
key = key.strip()
if 'PASSWORD' in key: