[Toybox] patch: add built-in versions of sha-2 family hash functions

Rob Landley rob at landley.net
Mon Jun 21 20:34:00 UTC 2021



On 6/21/21 10:07 AM, Denys Vlasenko wrote:
> On Sat, Jun 19, 2021 at 1:50 PM Denys Vlasenko <vda.linux at googlemail.com> wrote:
>> The situation of "oh no, fork XYZ added essentially the same
>> functionality too...but with other option letters, and they
>> count fields from 0, not from 1... and they used OUR option
>> letter for something entirely different! ARGH"
>> is irritatingly repeating itself, as if we never learn.
> 
> Real example:
> 
> su [-lp] [-u UID] [-g GID,...] [-s SHELL] [-c CMD] [USER [COMMAND...]]
>        -u      Switch to UID instead of USER
>        -g      Switch to GID (only root allowed, can be comma separated list)
> 
> util-linux has no -u UID.
> util-linux has -g, but it's not -g GID. Instead, it's -g GROUPNAME,
> it does not accept comma list of groups, and it sets only primary group.
> util-linux has -G GROUP for setting supplementary group ids,
> and to set more than one of them, they use -G GRP1 -G GRP2 style.
> .

Huh, apparently https://github.com/landley/toybox/commit/cd358823399a didn't
revert enough of commit e191597e6bbf0. The changed help text is still there, but
not implemented.

Yes, you found a toybox bug nobody's poked me about: once upon a time I
accidentally did a commit without --patch and thus the help text of the command
includes stuff that was under consideration at one point, but never got implemented.

(Android doesn't use su and the embedded systems I put together mostly have root
and one other user. Most of the useradd/userdel command family is still in
pending, so this command doesn't get a lot of exercise yet...)

Rob


More information about the busybox mailing list