This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: initgroups


Corinna Vinschen wrote:
> > If we decide on 1) shouldn't we remove calls to {ug}id16to(ug}id32 from
> > passwd.cc, grp.cc and syscalls.cc, 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, after sleeping over it I now think that the interaction between 16
and 32 bit ids you point out makes solution 2 (as described in my previous e-mail)
counterproductive, potentially generating more confusion. Posix doesn't make -1
an illegal {UG}ID. If a user decides to create {ug}id to FFFF or FFFFFFFF (or has
such a RID that we get in emulated passwd/group files), we can handle them as best
we can, supporting them for everything except possibly chown. 
Thus I am now leaning to a solution 1...

Pierre 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]