Subject: Re: bin/11047: newgrp is missing
To: Andrew Brown <email@example.com>
From: Greg A. Woods <firstname.lastname@example.org>
Date: 04/27/2002 14:02:59
[ On Friday, April 26, 2002 at 23:13:36 (-0400), Andrew Brown wrote: ]
> Subject: Re: bin/11047: newgrp is missing
> > On systems with setgroups(2) the 'newgrp' command only changes the
> > default group (and that inludes Solaris!). So long as your system has
> > setgroups(2), and your user-ID has membership to all the groups you need
> > to do your job, and you don't mind leaving your default group as it is,
> > then you don't ever have to type 'newgrp', whether or not the command
> > exists!
> if one doesn't need it, then there's no need for it to exist. it has
> a vague usefulness under solaris, but only vague. there are (at
> least) two ways to get around without it.
It is needed for any _application_ that might use (only) getgid() or
getegid() to check group privileges. Only the kernel honours the
additional group privileges allowed by setgroups(2) by default.
(Of course as has also been mentioned it's also needed to support SysV
file creation semantics)
Greg A. Woods
+1 416 218-0098; <email@example.com>; <firstname.lastname@example.org>; <email@example.com>
Planix, Inc. <firstname.lastname@example.org>; VE3TCP; Secrets of the Weird <email@example.com>