Corinna Vinschen
Fri Sep 13 01:42:00 GMT 2002

On Wed, Sep 11, 2002 at 08:42:41PM -0400, Pierre A. Humblet wrote:
> At 04:12 PM 9/11/2002 +0200, Corinna Vinschen wrote:
> >>  why is the largest possible gid value forbidden? 
> >
> >It's not forbidden in the first place, it has a special meaning
> >when used as parameter to chown(), see
> >
> OK, thanks Corinna. However we also give it special meaning (noop) 
> in setegid () (and similarly for uid in seteuid). 
> gives us no such choice. We can either 1) accept it (if the user has been
> foolish enough to put it in /etc/group),
> or 2) return EINVAL if we decide that our implementation does not 
> support it outright (even if it's in /etc/group).
> If we decide on 1) shouldn't we remove calls to {ug}id16to(ug}id32 from
>, and, EXCEPT in the various cases of chown 
> (i.e. simply do as getgrgid (), which doesn't call gid16togid32)?
> Also, we shouldn't rely on ILLEGAL_UID in dcrt0. 
> If we decide on 2), shouldn't we enforce it everywhere? One possibility is
> not to read in passwd and group entries with "illegal" {ug}id values.

After looking into this I think 2) is the way to go.  We can't support
that uid/gid for apparent reasons so we should take the approach to
invalidate it everywhere, yes.  

However, that would mean that we have to treat both values as
illegal, ILLEGAL_[UG]ID and ILLEGAL_[UG]ID16.  This looks a little
bit weird to me...


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                      
Red Hat, Inc.

More information about the Cygwin-patches mailing list