Skip to content

Commit

Permalink
RANGER-4722: HDFS authorization logic for directory hierarchy rooted …
Browse files Browse the repository at this point in the history
…at '/' is incorrect
  • Loading branch information
Abhay Kulkarni committed Feb 21, 2024
1 parent 4280c51 commit c4f6cc3
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,11 @@ private void checkRangerPermission(String fsOwner, String superGroup, UserGroupI
if (subDirAuthStatus != AuthzStatus.ALLOW) {
for(INode child : cList) {
if (child.isDirectory()) {
directories.push(new SubAccessData(child.asDirectory(), resourcePath + Path.SEPARATOR_CHAR + child.getLocalName()));
if (data.resourcePath.endsWith(Path.SEPARATOR)) {
directories.push(new SubAccessData(child.asDirectory(), data.resourcePath + child.getLocalName()));
} else {
directories.push(new SubAccessData(child.asDirectory(), data.resourcePath + Path.SEPARATOR_CHAR + child.getLocalName()));
}
}
}
}
Expand Down

0 comments on commit c4f6cc3

Please sign in to comment.