Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-2673

repair creates a directory with dollarsign in its name

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 2.1.0
    • None
    • Admin
    • None
    • ALL

    Description

      The repair command creates a directory whose name starts with a dollarsign (e.g., $tmp_repairDatabase_0), which is a Unix shell metacharacter. In case an operator wants to get rid of that directory for some reason (e.g., a failed repair or something), the consequences of failing to escape or quote that dollarsign can be maximally bad, e.g.,

      rm -r ./$tmp_repairDatabase_0 # will blow away the contents of cwd
      rm -r $tmp_repairDatabase_0/ # will blow away the entire file system

      Ideally, no filename should ever include shell metacharacters. A trivial fix that ought to suffice would be to change the repair directory's name to start with something like an underscore.

      Attachments

        Activity

          People

            mathias@mongodb.com Mathias Stearn
            richard.kreuter Richard Kreuter (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: