aboutsummaryrefslogtreecommitdiff
path: root/console-tools
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2017-07-02 15:42:50 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-07-04 17:10:31 +0200
commitd253b557a338c5fe27e8f5e55540db07e7842fc4 (patch)
tree4d7143c4284d803cf559d394ed48392408ce7335 /console-tools
parent558aae1a3384fce626d98608730f3b2d919bb78f (diff)
downloadbusybox-d253b557a338c5fe27e8f5e55540db07e7842fc4.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 'console-tools')
0 files changed, 0 insertions, 0 deletions