Subject: Re: bin/792: su(1) ignores primary group, it and id(1) disagree with kernel on group membership
To: Jason Downs <downsj@peak.org>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: netbsd-users
Date: 02/11/1995 13:13:33
On Sat, 11 Feb 1995 11:39:05 -0800 
 Jason Downs <downsj@PEAK.ORG> wrote:

 > Exactly.  So if your groups change, you can run newgrp(1) to re-initialize
 > them.  Granted, just running login(1) again would this... But newgrp(1)
 > also allowed the user to specify a primary group.
 > 

If I remember correctly, HP-UX's newgrp(1) actually spawned a new shell 
with the effective gid corresponding to the group name you provided as an 
argument.  I don't believe that HP-UX has an initgroups(3) call...

Now, if NetBSD were to ever have a newgrp(1) (good/bad?) it would also 
have to spawn a new shell (initgroups, setgid, setuid, exec).  Seems kinda 
cheesy to me, but then again...I guess one could always ``exec newgrp''.

--------------------------------------------------------------------------
Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffet Field, CA 94035                                 Pager: 415.428.6939