[Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

Xabier Oneca -- xOneca xoneca at gmail.com
Fri Sep 5 16:53:20 UTC 2014


El 05/09/2014 18:42, "Ralf Friedl" <Ralf.Friedl at online.de> escribió:
>
> Xabier Oneca -- xOneca wrote:
>>
>> >> And I want to add that --help will only be used ever in an interactive
>>
>> >> shell by a person, so the return value may be dispensable. (i.e.
>> >> doesn't mind to the user how does --help return as soon as the help
>> >> text is printed in screen)
>> >
>> > Actually this is the argument to leave it as it is, because nobody
cares about the return value of "false --help".
>>
>> What I was trying to say is that if a script appends --help to
/bin/false because of a poorly sanitized user input, it should still return
1. And this change in behaviour wont not break any script nor user
interaction with the applet. (Maybe even fixes some scripts!)
>>
> Do you have an example of any real word script that passes any arguments
(user supplied or not) to /bin/false ?

Well... no. But I was thinking in a hypothetical script that takes a shell
from /etc/passwd and a command from the user.

Cheers,

Xabier Oneca_,,_
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20140905/77c55e1d/attachment.html>


More information about the busybox mailing list