[BusyBox] my_getpw(u/g)id

Tito farmatito at tiscali.it
Mon Aug 30 21:29:34 UTC 2004


On Monday 30 August 2004 OO:59, you wrote:
> Tito,
> 
> > I looked on google a half night to find some standard value but
> > the only notice I've found was in man sysconf:
> > 
> >        LOGIN_NAME_MAX - _SC_LOGIN_NAME_MAX
> >               Maximum  length  of a login name, including the final NUL.  Must
> >               not be less than _POSIX_LOGIN_NAME_MAX (9).
> > 
> > So there is a minimum of 9 but no maximum set.
> 
> I think, for minimalistic system as busybox, 9 - best for support only.

Hi, vodz
but when busybox is used on install disks to perform installs or upgrades
or on rescue disks maybe it has to deal with a full system so IMHO
it would be better to have not this limitation.
  
> > The other occurrences of my_getpw(u/g)id() look ok to me as they
> > work with buffers of different sizes:
> > 128 in logger.c
> > 32  in tar.c
> 
> But, the tar format have byte-count specification
> /usr/include/tar.h
> uid and gid must have 8 chars (spacefill).
> Is not, its not "tar" :-P

I know, the solution I've proposed was mainly to avoid
overflows and to much code change short before release.
This can be changed in the future.
There are already some patches proposed by Felipe Kellerman.
Take a look at them I would like to hear your opinion too.

> > BTW: while working on id I missed a feature in bb_getopt_ulflags:
> > It would be nice if we could set a rule to say:
> > 
> > switch x  never used alone
> 
> Hmm. May be use not from getopt? ;-)

I'm thinking about it,........but i've found an alternative solution 

flags = bb_getopt_ulflags(argc, argv, "rnug");

not -r
not -n
not -rn

	if (flags <= 3 && flags > 0) 
		bb_show_usage();

> > also some rule to override ~ would be nice like:
> > n~r no
> > gnr yes
> 
> Strange syntax. ;-)

Just an idea.........
> 
> --w
> vodz

Ciao,
Tito
> 



More information about the busybox mailing list