Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-16983

Fix concat operation doesn't honor dfs.permissions.enabled

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      In concat RPC, it will call FSDirConcatOp::verifySrcFiles() to check the source files. In this function, it would make permission check for srcs. Whether do the permission check should be decided by dfs.permissions.enabled configuration. And the 'pc' parameter is always not null.

      So we should change 'if (pc != null)' to 'if (fsd.isPermissionEnabled())'.

      // permission check for srcs
      if (pc != null) {
        fsd.checkPathAccess(pc, iip, FsAction.READ); // read the file
        fsd.checkParentAccess(pc, iip, FsAction.WRITE); // for delete
      } 
      
      

      Attachments

        Issue Links

          Activity

            People

              caozhiqiang caozhiqiang
              caozhiqiang caozhiqiang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: