mirror of
https://github.com/nmap/nmap.git
synced 2026-10-20 19:01:56 +00:00
Properly quote arguments to su-to-zenmap.sh
Found with http://www.shellcheck.net/ Error was: https://github.com/koalaman/shellcheck/wiki/SC2124
This commit is contained in:
parent
2380ccac5e
commit
7a32fcb9f5
1 changed files with 7 additions and 1 deletions
|
|
@ -5,7 +5,13 @@
|
|||
#Bill Allombert <ballombe@debian.org>
|
||||
|
||||
PRIV=root
|
||||
COMMAND="zenmap $@"
|
||||
COMMAND="zenmap"
|
||||
|
||||
quote () { printf %s\\n "$1" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/'/" ; }
|
||||
|
||||
for i in "$@"; do
|
||||
COMMAND="$COMMAND $(quote "$i")"
|
||||
done
|
||||
|
||||
euid=$(id -u)
|
||||
privid=$(id -u $PRIV)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue