[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [BusyBox] my_getpw(u/g)id
From:       Tito <farmatito () tiscali ! it>
Date:       2004-08-30 19:25:28
Message-ID: 200408302129.34913.farmatito () tiscali ! it
[Download RAW message or body]

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
> 
_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic