jojochuang commented on a change in pull request #1829: HDFS-14743. Enhance 
INodeAttributeProvider/ AccessControlEnforcer Interface in HDFS to support 
Authorization of mkdir, rm, rmdir, copy, move etc...
URL: https://github.com/apache/hadoop/pull/1829#discussion_r391311899
 
 

 ##########
 File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
 ##########
 @@ -1982,6 +1982,7 @@ void setPermission(String src, FsPermission permission) 
throws IOException {
     FileStatus auditStat;
     checkOperation(OperationCategory.WRITE);
     final FSPermissionChecker pc = getPermissionChecker();
+    FSPermissionChecker.setOperationType(operationName);
 
 Review comment:
   Thanks @xiaoyuyao for the review. 
   * FSDirSymlinkOp#createSymlinkInt() is an exception. It doesn't check 
permission in the FSNamesystem so missed this one. Added.
   
   * NameNodeAdapter#getFileInfo() is used only in tests. 
   * NamenodeFsck#getBlockLocations() --> call it fsckGetBlockLocations to 
distinguish it from regular open operations.
   * 
FSNDNCache#addCacheDirective/removeCacheDirective/modifyCacheDirective/listCacheDirectives/listCachePools
 --> done
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to