[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Exit code of id depending on user group
From: |
Felipe Kellermann |
Subject: |
Re: Exit code of id depending on user group |
Date: |
Tue, 14 Sep 2004 21:19:14 -0300 (BRT) |
On Mon, 13 Sep 2004 3:47am -0700, Paul Eggert wrote:
> Felipe Kellermann <address@hidden> writes:
>
> > $ id fuu
> > uid=1018(fuu) gid=199 groups=199
> > $ echo $?
> > 1
> >
> > That return code sounds strange to me given the question I did.
>
> I agree. To fix things, I installed the patch enclosed below.
> Thanks for reporting this.
Hi Eggert,
Thanks for fixing that!
> > id: unknown gid 199
> > $ echo $?
> > 1
>
> Yes that sounds right. Doesn't GNU id do that already, though?
Exactly, using the current sources it does that. But I thought that by
installing a patch similar to that diff you just sent that change would
have to be explicitly made, something like (grp == NULL && just_group),
but I had never looked at the coreutils code, was just trying to make a
good proposion of my desired behavior and ideas. I did a quick reading
now and noticed that `print_group' takes care of that cases. Perfect!
Two questions now:
1. I see your code isn't applied directly to savannah's repository.
Is there an alternative repository?
BTW, today apparently some modules of the server are "broken", there's
some modules that we just can't check out, including coreutils. I was
reading the code via ViewCVS.
2. You're certainly an authoritative person to answer this question:
Why the Standards doesn't specify exactly the return codes, at least
for the most common cases, for the applications? Whouldn't that be
easier to make some decisions?
Thanks,
--
Felipe Kellermann