[PATCH] new features for deluser/delgroup
Tito
farmatito at tiscali.it
Sat Apr 14 20:30:11 UTC 2007
Hi,
this patch adds support to delgroup to
remove an user from a specific group
if called with two non-option arguments
(to be coherent with addgroup which allows us
to add an user to an existing group).
This feature is optional and turned off by default.
This patch if CONFIG_DESKTOP is enabled also
adds a warning when we try to remove the primary group of an existing user.
Bloat o meter says:
1) without the new features: size is about the same as before.
ENABLE_FEATURE_DELUSER_FROM_GROUP = no
CONFIG_DESKTOP = no
function old new delta
deluser_main 84 121 +37
del_line_matching 199 198 -1
packed_usage 22127 22124 -3
.rodata 123971 123939 -32
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/3 up/down: 37/-36) Total: 1 bytes
2) with ENABLE_FEATURE_DELUSER_FROM_GROUP = yes
and CONFIG_DESKTOP = no
function old new delta
del_line_matching 199 438 +239
deluser_main 84 139 +55
packed_usage 22127 22124 -3
.rodata 123971 123939 -32
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/2 up/down: 294/-35) Total: 259 bytes
3) with ENABLE_FEATURE_DELUSER_FROM_GROUP = yes
and CONFIG_DESKTOP = yes it adds about more 25 bytes.
deluser_main 84 165 +81
The patch is tested and seems to work for me
it applies cleanly to svn revision 18446.
Critics and review are as always welcome. ;-)
Please apply if you like it.
Ciao,
Tito
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deluser.patch
Type: text/x-diff
Size: 6604 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20070414/bd0de240/attachment-0002.bin
More information about the busybox
mailing list