[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: busybox with single applet enabled
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2011-05-21 19:33:29
Message-ID: 201105212133.29946.vda.linux () googlemail ! com
[Download RAW message or body]
On Saturday 21 May 2011 20:33, Sergey Naumov wrote:
> > 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.
> > + */
> > +#if ENABLE_FEATURE_ADDGROUP_LONG_OPTIONS
> > + argv[1] = (char*)"--gid";
> > +#else
> > argv[1] = (char*)"-g";
> > +#endif
> >
> > 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.
>
> That will not work if addgroup is disabled.
>
> This is better I think:
> #if ENABLE_FEATURE_ADDGROUP_LONG_OPTIONS || ! ENABLE_ADDGROUP
> argv[1] = (char*)"--gid";
> #else
> /* applet is enabled, but without long options
> * here we can try to directly call applet within busybox
> * if FEATURE_PREFER_APPLETS is disabled
> * to ensure correct work if applet is not installed,
> * but that will bloat the code
> */
> argv[1] = (char*)"-g";
> #endif
Ok. Did this in git.
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic