ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject ranger git commit: RANGER-1361:RangerHDFSPlugin audits for Ancestor, Sub level and parent access doesn't have the correct accessType
Date Fri, 10 Feb 2017 06:28:27 GMT
Repository: ranger
Updated Branches:
  refs/heads/master 4a1e4928a -> 254ebf156


RANGER-1361:RangerHDFSPlugin audits for Ancestor, Sub level and parent access doesn't have
the correct accessType


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

Branch: refs/heads/master
Commit: 254ebf1569de4ef4792033d21c321e93592ebd14
Parents: 4a1e492
Author: rmani <rmani@hortonworks.com>
Authored: Thu Feb 9 22:28:06 2017 -0800
Committer: rmani <rmani@hortonworks.com>
Committed: Thu Feb 9 22:28:06 2017 -0800

----------------------------------------------------------------------
 .../ranger/authorization/hadoop/RangerHdfsAuthorizer.java   | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/254ebf15/hdfs-agent/src/main/java/org/apache/ranger/authorization/hadoop/RangerHdfsAuthorizer.java
----------------------------------------------------------------------
diff --git a/hdfs-agent/src/main/java/org/apache/ranger/authorization/hadoop/RangerHdfsAuthorizer.java
b/hdfs-agent/src/main/java/org/apache/ranger/authorization/hadoop/RangerHdfsAuthorizer.java
index d92bf12..324551d 100644
--- a/hdfs-agent/src/main/java/org/apache/ranger/authorization/hadoop/RangerHdfsAuthorizer.java
+++ b/hdfs-agent/src/main/java/org/apache/ranger/authorization/hadoop/RangerHdfsAuthorizer.java
@@ -386,7 +386,6 @@ public class RangerHdfsAuthorizer extends INodeAttributeProvider {
 						if(auditHandler != null) {
 							INode    nodeChecked = inode;
 							FsAction action      = access;
-
 							if(isTraverseOnlyCheck) {
 								if(nodeChecked == null || nodeChecked.isFile()) {
 									if(parent != null) {
@@ -397,14 +396,14 @@ public class RangerHdfsAuthorizer extends INodeAttributeProvider {
 								}
 
 								action = FsAction.EXECUTE;
-							} else if(action == null) {
-								if(parentAccess != null) {
+							} else if(action == null || action == FsAction.NONE)  {
+								if(parentAccess != null && parentAccess != FsAction.NONE ) {
 									nodeChecked = parent;
 									action      = parentAccess;
-								} else if(ancestorAccess != null) {
+								} else if(ancestorAccess != null  && ancestorAccess != FsAction.NONE ) {
 									nodeChecked = ancestor;
 									action      = ancestorAccess;
-								} else if(subAccess != null) {
+								} else if(subAccess != null && subAccess != FsAction.NONE ) {
 									action = subAccess;
 								}
 							}


Mime
View raw message