Subject: Re: bin/11047: newgrp is missing
To: NetBSD Userlevel Technical Discussion List <tech-userlevel@netbsd.org>
From: Andrew Brown <atatat@atatdot.net>
List: tech-userlevel
Date: 04/27/2002 15:21:32
>> > 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.

that sounds like a problem with those applications, not a need for
newgrp.

>(Of course as has also been mentioned it's also needed to support SysV
>file creation semantics)

it wouldn't help there.  istm it's also been mentioned that sysv needs
it to get semantics we don't have.

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