Repository: ranger Updated Branches: refs/heads/master a62060fb0 -> 550cefcb6
RANGER-1870:Modify the logic for buildUnixUserList and parseMembers method in UnixUserGroupBuilder class Signed-off-by: zhangqiang2 <zhangqia...@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/550cefcb Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/550cefcb Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/550cefcb Branch: refs/heads/master Commit: 550cefcb6c7cd9009c123f8052cf6cc45ee6350b Parents: a62060f Author: zhangqiang2 <zhangqia...@zte.com.cn> Authored: Fri Nov 3 10:16:14 2017 +0800 Committer: zhangqiang2 <zhangqia...@zte.com.cn> Committed: Mon Nov 6 08:44:10 2017 -0500 ---------------------------------------------------------------------- .../apache/ranger/unixusersync/process/UnixUserGroupBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ranger/blob/550cefcb/ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java ---------------------------------------------------------------------- diff --git a/ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java b/ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java index 045fe3f..60ce08d 100644 --- a/ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java +++ b/ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java @@ -222,7 +222,7 @@ public class UnixUserGroupBuilder implements UserGroupSource { int len = tokens.length; - if (len < 3) { + if (len < 4) { LOG.warn("Unable to parse: " + line); continue; } @@ -350,7 +350,7 @@ public class UnixUserGroupBuilder implements UserGroupSource { String[] tokens = line.split(":"); - if (tokens.length < 2) + if (tokens.length < 3) return; String groupName = tokens[0];