busybox with single applet enabled

Tito farmatito at tiscali.it
Fri May 20 19:33:05 UTC 2011



On Friday 20 May 2011 20:08:30 you wrote:
> To Tito:
> > Maybe something like this in adduser.c:
> >
> > /* We assume that if bb's addgroup applet is enabled we will use it */
> > if (ENABLE_ADDGROUP && !ENABLE_FEATURE_ADDGROUP_LONG_OPTIONS) {
> >                argv[1] = (char*)"-g";
> > } else {
> >                /* external addgroup or bb's addgroup with long options */
> >                argv[1] = (char*)"--gid";
> > }
> >                argv[2] = utoa(p->pw_gid);
> >                argv[3] = (char*)"--";
> >                argv[4] = p->pw_name;
> >                argv[5] = NULL;
> >
> > Untested, just an idea.
> > Ciao,
> > Tito
> 
> Tito, I think your code is fine for common case, but won't work in
> corner ones: let's assume that you configured busybox with adduser
> support (without long options), may be even installed it, but then you
> installed (let it be desktop system) adduser package. Your wrapper
> script was rewritten by full-blown adduser, but condition in if
> remains true => -g option used.

In fact my target was to fix the compatibility issue trying to detect
some sane defaults that do not increase codesize, of course
there will be always corner cases, but it will be impossibile 
to take care of all.
 
> 
> To Ralf:
> Of course I use symlink now, ./applet -> ./busybox in my description
> points to it =). I investigated this issue just because I thought that
> it is busybox bug and wanted to solve it.
> But may be It is better to warn others at compiling stage by final
> message when result of compilation is reported.
> 



More information about the busybox mailing list