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

repair creates a directory with dollarsign in its name

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.1.0
    • Affects Version/s: None
    • Component/s: Admin
    • Labels:
      None
    • ALL

      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.

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

              Created:
              Updated:
              Resolved: