Applet adduser hurds Busybox standalone feature

Harald Becker ralda at gmx.de
Thu Feb 24 21:30:22 UTC 2011


 Hallo Tito!
> On Thursday 24 February 2011 18:53:17 Harald Becker wrote:
>> The applet adduser uses a system() call for addgroup activation. An activation, which shouldn't have been done either, as the group "users" already exist and primary users shall normally not be added to the group file (in my opinion).
> this could be easily fixed by reverting to the old behaviour,
> as before commit 38d3e64d2593aa5bc6bb578e1cd9a73a2d4b26fa
> but this was Denys's patch so it's up to him.
I noted that Denys was somehow involved in the changes, therefore I
added his name in the top. So it's up to Denys to tell why he did this.
Is this upstream conform or what was the reason to add the user to
/etc/group at this place?

> I agree with you that using system() calls is not the most elegant
> solution... but unless we remove all functions that could call exit
> in addgroup_main() we cannot use it directly.
We don't talk about elegance here. Ok, it would be really fine, if the
addgroup_main could be called directly, but that wasn't my topic.
Fork/exec at this time is ok, but doing that via an extra shell is
overdone. At other places the running busybox shell calls such applets
by executing itself. This has at least to be done here. There should be
a function in libbb for this, and probably it is already there ...
uhhhhh ... we need a listing of in libbb available functions with a
short description what they do (function name, argument names without
types, short description as a one or two liner; functions possibly
grouped by category like exec functions, string handling functions,
etc.). Can me modify the source and place such short descriptions ahead
of each function and than extract that with a make option to create a
library doku? Just as an idea (brain storming).

--
Harald


More information about the busybox mailing list