Subject: Re: kern/4217: the kernel's handling of group permissions is suboptimal
To: David Laight <david@l8s.co.uk>
From: Andrew Brown <atatat@atatdot.net>
List: netbsd-bugs
Date: 08/10/2003 12:25:35
>1) Posix takes the stance:
>    The related function setgroups() is a privileged operation and
>    therefore is not covered by this volume of IEEE Std 1003.1-2001.
>   which is rather a copout and not helpful at all!

if the man page says "only the superuser can add more groups" and
posix says "hey, look...a yak", then it doesn't seem to me to be wrong
to adjust the code slightly in order to allow people to lower their
privileges.

>2/3/4) Posix requires the current behaviour.
>   Although I agree that being able to call setgid() with any of the
>   supplemantary groups could be useful - although of limited use
>   given that netbsd doesn't use the actual group for very much.

uh...nfs?  besides, it would be rather useful if a process that had
gained privileges via a setgid binary to be able to give away all its
other group privileges...

>Perhaps the documentation of setgroups should be changed?

nah...

>Or maybe we should let a non-priveleged user re-order the list?

yeah...

imho.

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
werdna@squooshy.com       * "information is power -- share the wealth."