]> sipb.mit.edu Git - wiki.git/commitdiff
slightly expand new section on distinguishing options from positional arguments
authorAlexander W Dehnert <adehnert@mit.edu>
Fri, 5 Apr 2013 05:53:30 +0000 (01:53 -0400)
committersipb-www <sipb-www@lucky-star.mit.edu>
Fri, 5 Apr 2013 05:53:30 +0000 (01:53 -0400)
doc/safe-shell.mdwn

index 4913abfd081af90f05c95e192a38c212237cf686..f2cf72647008dbe7be1a4bf12bf17193999f2430 100644 (file)
@@ -107,7 +107,7 @@ If you get filenames from the user or from shell globbing, or any other kind of
 
 Fixing this depends on what command you're running.
 
 
 Fixing this depends on what command you're running.
 
-For many, however, `--` is accepted to indicate that any options are done, and future arguments should be parsed as positional parameters --- even if they look like options. In the `sudo` example above, `sudo -u nobody -- "$@"` would avoid this attack (though obviously limiting this in the `sudo` configuration should be done as well).
+For many, however, `--` is accepted to indicate that any options are done, and future arguments should be parsed as positional parameters --- even if they look like options. In the `sudo` example above, `sudo -u nobody -- "$@"` would avoid this attack (though obviously limiting which users commands can be run as in the `sudo` configuration should be done as well).
 
 Another approach is to prefix each filename with `./`, if the filenames are expected to be in the current directory.
 
 
 Another approach is to prefix each filename with `./`, if the filenames are expected to be in the current directory.