Date: Tue, 16 Jan 2001 15:08:21 -0800 From: Cy Schubert - ITSD Open Systems Group <Cy.Schubert@uumail.gov.bc.ca> To: Marc Slemko <marcs@znep.com> Cc: John Baldwin <jhb@FreeBSD.ORG>, arch@FreeBSD.ORG Subject: Re: no newgroup/newgrp in FreeBSD? Message-ID: <200101162308.f0GN8Xt24503@cwsys.cwsent.com> In-Reply-To: Your message of "Tue, 16 Jan 2001 14:50:41 PST." <Pine.BSF.4.20.0101161445270.6880-100000@alive.znep.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.BSF.4.20.0101161445270.6880-100000@alive.znep.com>,
Marc Slemk
o writes:
> 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 wrap
> per
> > >> for running a new command with no changes... That would be compliant wi
> th
> > >> 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.
I fail to see how login -f or logging out and in again would provide
what the originator of this thread wants to do. Nor do I see how a
noop would fill the bill either. Simply put, newgrp is a SYSVism that
cannot emulated under BSD.
I suppose we could implement the sgid bit for directories to implement
SYSV behaviour when during file/directory creation -- the reverse of
SYSV's sgid bit for directories -- and along with it a newgrp program.
Then again, why? If I wanted to use a SYSV system instead of a BSD
system I'd use Solaris x86 instead of FreeBSD. Linux uses SYSV
semantics as well so it would be an alternative to Solaris.
Regards, Phone: (250)387-8437
Cy Schubert Fax: (250)387-5766
Team Leader, Sun/Alpha Team Internet: Cy.Schubert@osg.gov.bc.ca
Open Systems Group, ITSD, ISTA
Province of BC
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?200101162308.f0GN8Xt24503>
