On Monday 28 April 2008, Garrett Cooper wrote:
> On Mon, Apr 28, 2008 at 1:28 PM, Garrett Cooper <[EMAIL PROTECTED]> wrote:
> > On Sun, Apr 27, 2008 at 6:54 PM, Garrett Cooper <[EMAIL PROTECTED]>
> >
> > wrote:
> > > On Apr 27, 2008, at 6:37 PM, Mike Frysinger wrote:
> > >
> > > i'm guessing the #! change was an accident.  otherwise i've
> > > incorporated
> > >
> > > > the
> > > > re-order and committed.
> > > > -mike
> > >
> > > Ah, the shebang change was intentional but I forgot to remove it.
> > > /bin/sh != /bin/bash on FreeBSD..
> > > Thanks,
> > > -Garrett
> >
> > [EMAIL PROTECTED] ~]# id nobody; echo $?
> > uid=99(nobody) gid=99 groups=25(eng),15045(enged),99
> > 1
> >
> > After looking at id.c for coreutils-5.21 I tied down the issue to
> > getgrgid(3). The errno makes absolutely no sense though, and it seems to
> > have been "fixed" between various kernel versions:
> >
> > [EMAIL PROTECTED] ~]# ./getgr_t_wrapper.sh
> > 42 ($i) not found in /etc/group
> > 99 ($i) not found in /etc/group
> > Error encountered with getgrgid(99): No such file or directory
> > [EMAIL PROTECTED] ~]# uname -a
> > Linux nova-infra-test1 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:13:01 EST
> > 2006 i686 i686 i386 GNU/Linux
> >
> > headless-horseman src # ~gcooper/getgr_t_wrapper.sh
> > 42 ($i) not found in /etc/group
> > Error encountered with getgrgid(42): 0, Success
> > 99 ($i) not found in /etc/group
> > Error encountered with getgrgid(99): 0, Success
> >
> > So, the moral of the story I suppose is "don't trust buggy kernels which
> > reporting the wrong errno info via get*[gu]id". I really don't like the
> > fact that the manpage doesn't match the expected behavior though >:(...
> >
> > I attached the test source files and have started an upstream discussion
> > with the folks at kernel.org: <
> > http://bugzilla.kernel.org/show_bug.cgi?id=10573>.
>
> (sorry -- forgot the introduction):
>
> I was basically saying, "maybe we should avoid looking at exit codes from
> id"?

doesnt matter to me so long as the same result is achieved: a method for 
reliably querying the system for users.  i'd point out that since we're so 
heavily reliant on /etc/passwd already, might as well convert ife to gfe 
on /etc/passwd.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to