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

org.apache.hadoop.fs.Df should not use bash -c

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • None
    • None
    • None
    • None

    Description

      org.apache.hadoop.fs.Df shouldn't use bash -c. The only reason why it is using it right now is to combine stderr and stdout, something that can be done easily from Java.

      bash may not be present on all systems, so having it as a dependency is undesirable. There are also potential problems in cases where paths contain shell metacharacters. Finally, having this code here encourages people to copy this use of bash, potentially introducing more shell injection flaws.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              cmccabe Colin McCabe
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: