From owner-freebsd-arch Tue Jan 16 15:10:45 2001 Delivered-To: freebsd-arch@freebsd.org Received: from point.osg.gov.bc.ca (point.osg.gov.bc.ca [142.32.102.44]) by hub.freebsd.org (Postfix) with ESMTP id B370237B698; Tue, 16 Jan 2001 15:10:25 -0800 (PST) Received: (from daemon@localhost) by point.osg.gov.bc.ca (8.8.7/8.8.8) id PAA04373; Tue, 16 Jan 2001 15:09:53 -0800 Received: from passer.osg.gov.bc.ca(142.32.110.29) via SMTP by point.osg.gov.bc.ca, id smtpda04369; Tue Jan 16 15:09:35 2001 Received: (from uucp@localhost) by passer.osg.gov.bc.ca (8.11.2/8.9.1) id f0GN9U616447; Tue, 16 Jan 2001 15:09:30 -0800 (PST) Received: from cwsys9.cwsent.com(10.2.2.1), claiming to be "cwsys.cwsent.com" via SMTP by passer9.cwsent.com, id smtpdj16445; Tue Jan 16 15:08:34 2001 Received: (from uucp@localhost) by cwsys.cwsent.com (8.11.2/8.9.1) id f0GN8Xt24503; Tue, 16 Jan 2001 15:08:33 -0800 (PST) Message-Id: <200101162308.f0GN8Xt24503@cwsys.cwsent.com> Received: from localhost.cwsent.com(127.0.0.1), claiming to be "cwsys" via SMTP by localhost.cwsent.com, id smtpdE24499; Tue Jan 16 15:08:21 2001 X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 Reply-To: Cy Schubert - ITSD Open Systems Group From: Cy Schubert - ITSD Open Systems Group X-OS: FreeBSD 4.2-RELEASE X-Sender: cy To: Marc Slemko Cc: John Baldwin , arch@FreeBSD.ORG Subject: Re: no newgroup/newgrp in FreeBSD? In-reply-to: Your message of "Tue, 16 Jan 2001 14:50:41 PST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 16 Jan 2001 15:08:21 -0800 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message , 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