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


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
>http://www.opengroup.org/onlinepubs/007904975/functions/chown.html

OK, thanks Corinna. However we also give it special meaning (noop) 
in setegid () (and similarly for uid in seteuid). 
http://www.opengroup.org/onlinepubs/007904975/functions/setegid.html
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
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.

Pierre


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