summaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorPatrick Steinhardt2017-07-02 15:42:50 +0200
committerDenys Vlasenko2017-07-18 19:20:58 +0200
commitee67c9a60ab202cb8f8cc13d8670a90cbfad7963 (patch)
tree81f49a27e81c0974155ddab827d65122a5229154 /miscutils
parent8965e5089efea4fdfc27241967098833f56de060 (diff)
downloadbusybox-ee67c9a60ab202cb8f8cc13d8670a90cbfad7963.zip
busybox-ee67c9a60ab202cb8f8cc13d8670a90cbfad7963.tar.gz
setpriv: do not process remaining args
By default, the 'getopt32' call will continue parsing the command line even after hitting a non-option string. But in setpriv, this should be avoided, as all parameters following the initial non-option argument are in fact arguments to the binary that is to be executed by setpriv. Otherwise, calling e.g. 'busybox setpriv ls -l' would result in an error due to the unknown parameter "-l". Fix the issue by passing "+" as the first character in the options string. This will cause 'getopt32' to stop processing after hitting the first non-option. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils')
0 files changed, 0 insertions, 0 deletions