Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jan 2001 14:50:41 -0800 (PST)
From:      Marc Slemko <marcs@znep.com>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        arch@FreeBSD.org
Subject:   Re: no newgroup/newgrp in FreeBSD?
Message-ID:  <Pine.BSF.4.20.0101161445270.6880-100000@alive.znep.com>
In-Reply-To: <XFMail.010116144340.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 16 Jan 2001, John Baldwin wrote:

> 
> On 16-Jan-01 Marc Slemko wrote:
> > On Tue, 16 Jan 2001, Peter Wemm wrote:
> > 
> >> This functionality does not have any place in FreeBSD as "all groups in
> >> the groups vector are equal".  We could simply provide a non-setuid wrapper
> >> for running a new command with no changes...  That would be compliant with
> >> the interface..  
> > 
> > newgrp is also of use when your group membership in /etc/groups has been
> > changed after you logged in and were setup with the appropriate group
> > list.
> > 
> > You login, are not a member of group freeporn, then someone adds you to
> > group freeporn, and "newgrp freeporn" will let you get free porn without
> > logging in again, etc.
> > 
> > No?
> 
> /usr/bin/login -f ${LOGNAME}

A non setuid wrapper would still not provide the same functionality that
newgrp does, which is part of what I'm repsonding to.

And login -f does not preserve things like environment, cwd, etc. like
newgrp does which matters when you have environment variables that vary
(eg. ssh authentication agent).  And you are then logged in twice.

Sure, there are lots of other ways to do nearly the same thing.  
Including simply logging out and logging in again.  The point is simply
that newgrp would not be a noop on freebsd if it were implemented and does
have some useful, if minor, functionality.



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.20.0101161445270.6880-100000>