Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-6235

Add 'argv' variant of 'os::system'

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.0.2, 1.1.0
    • None
    • None
    • 3

    Description

      The os::system() function always spawns whatever string you pass to is a a direct argument to sh -c '<arg_string>'. However, this can be problematic if you build <arg_string> from user supplied input and they have the opportunity to inject arbitrary commands at the end of it (e.g. by adding a "; rm -rf" as part of the last user supplied argument).

      To counter this, we should introduce a variant of os::system() that takes a single command and a list of args (similar to the posix_spawn() function.

      Attachments

        Activity

          People

            klueska Kevin Klues
            klueska Kevin Klues
            Jie Yu Jie Yu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: