busybox with single applet enabled

Denys Vlasenko vda.linux at googlemail.com
Sat May 21 17:57:40 UTC 2011

On Friday 20 May 2011 05:44, Sergey Naumov wrote:
> adduser/addgroup:
> While working on adduser -C, I found a todo about invocation of
> addgroup from adduser with -g flag and incompatibility with desktop
> adduser. I have tried to solve it, but discovered that we can
> unambiguously determine what kind of program we execute (applet or
> desktop program) only if FEATURE_PREFER_APPLETS is enabled. If it is
> disabled, then we can't detect type of program by finding executable -
> it could be just applet wrapper.

I propose that we at least make "fuller" config (one with more options
set to "yes") work properly:

+               /* Add user to his own group with the first free gid
+                * found in passwd_study.
+                * We try to use --gid, not -g, because "standard" addgroup
+                * has no such short option, it has only long --gid.
+                */
+               argv[1] = (char*)"--gid";
                argv[1] = (char*)"-g";

If FEATURE_ADDGROUP_LONG_OPTIONS=y, this will work with any "addgroup" -
busybox or standard. If FEATURE_ADDGROUP_LONG_OPTIONS!=y, then user
takes responsibility to ensure that "addgroup" on his system comes from bbox.


More information about the busybox mailing list