[PATCH] size reduction and better error reporting for deluser/delgroup

Harald Becker ralda at gmx.de
Mon Sep 27 00:36:04 UTC 2010


Hi Tito!

> the patch previously sent reduces the size of the deluser/delgroup
> commands. Size reduction with all options enabled is:
Fine! My approch was just a quick rewrite (without size considerations),
as I needed that applets function in some scripts.

> 1) we don't warn about removing user's primary group when doing delgroup

IMHO the only test required would be deleting a group (not user from
group) that is still used as a primary group in /etc/passwd. It is not
necessary to check if it's the users primary group while removing a user
from a group. This check would even be wrong, as it is a valid usage of
a group being used as a users primary group without user being
explicitly listed in the group file. The user this way has full group
privileges, but can't change back to that group if the group gets
changed (either explicitly or more likely implicitly by executing a SGID
program = tricky usage of that feature).


> 2) we don't remove users primary group when doing deluser

That would be fine, if this could be done ... else we may get left overs
of unknown users in the group file. Especially as admins tend to be
forgetfully ;-)


>         3) -h --help are treated as user/group names

Isn't the processing of those options done by the busybox main?
deluser/delgroup --help worked before ... so what has changed at this part?

--
Harald



More information about the busybox mailing list