From owner-freebsd-hackers Mon Dec 17 0:59: 8 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from science.slc.edu (Science.SLC.Edu [198.83.6.248]) by hub.freebsd.org (Postfix) with ESMTP id 97FF737B417 for ; Mon, 17 Dec 2001 00:59:00 -0800 (PST) Received: (from aschneid@localhost) by science.slc.edu (8.11.0/8.11.0) id fBH8uja40425; Mon, 17 Dec 2001 03:56:45 -0500 (EST) (envelope-from aschneid) Date: Mon, 17 Dec 2001 03:56:45 -0500 From: Anthony Schneider To: "Brandon D. Valentine" Cc: Andreas Klemm , apsfilter-hackers@apsfilter.org, freebsd-hackers@FreeBSD.ORG Subject: Re: aps2file doesn't work on FreeBSD Message-ID: <20011217035644.A40375@mail.slc.edu> References: <20011216195054.A36208@mail.slc.edu> <20011217030451.V94172-100000@turtle.looksharp.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="VS++wcV0S1rZb1Fb" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011217030451.V94172-100000@turtle.looksharp.net>; from bandix@looksharp.net on Mon, Dec 17, 2001 at 03:09:19AM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Linux: anthony:/home/anthony:9% uname -a Linux lappy.slc.edu 2.2.17-21mdk #1 Thu Oct 5 13:16:08 CEST 2000 i686 unkno= wn anthony:/home/anthony:10% su Password:=20 [root@lappy anthony]# echo $USER root [root@lappy anthony]# exit anthony:/home/anthony:11% su -l Password:=20 [root@lappy /root]# echo $USER root [root@lappy /root]#=20 FreeBSD: anthony:/home/anthony:20% uname -a FreeBSD flack.slc.edu 4.2-RELEASE FreeBSD 4.2-RELEASE #0: Mon Nov 20 13:02:= 55 GMT 2000 jkh@bento.FreeBSD.org:/usr/src/sys/compile/GENERIC i386 anthony:/home/anthony:21% su Password: flack# echo $USER anthony flack# exit anthony:/home/anthony:22% su -l Password: flack# echo $USER root flack# logout anthony:/home/anthony:23%=20 =46rom 'info su' on my linux box: By default, `su' does not change the current directory. It sets the environment variables `HOME' and `SHELL' from the password entry for USER, and if USER is not the super-user, sets `USER' and `LOGNAME' to USER. By default, the shell is not a login shell. su version (on my linux box): [root@lappy anthony]# su --version su (GNU sh-utils) 2.0 Written by David MacKenzie. Copyright (C) 1999 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root@lappy anthony]#=20 Perhaps it's time to contact gnu? -Anthony. [ and apologies for the line wrapping ] On Mon, Dec 17, 2001 at 03:09:19AM -0500, Brandon D. Valentine wrote: > On Sun, 16 Dec 2001, Anthony Schneider wrote: >=20 > >Well, the reason I brought up $USER inheritance is that on linux, $USER > >is root after an su to root, whereas on FreeBSD, the $USER is the same > >as before the su. >=20 > [Line wrap at 72, please] >=20 > Excerpt from su(1): > --- > By default, the environment is unmodified with the exception of USER, > HOME, and SHELL. HOME and SHELL are set to the target login's default > values. USER is set to the target login, unless the target login has a > user ID of 0, in which case it is unmodified. The invoked shell is the > target login's. This is the traditional behavior of su. > > -l Simulate a full login. > --- >=20 > You are observing none other than the expected behavior. I have never > seen Linux (GNU) su do things any differently in this regard. If they > do, it's broken. >=20 > Brandon D. Valentine > --=20 > "Iam mens praetrepidans avet vagari." > - G. Valerius Catullus, Carmina, XLVI >=20 >=20 > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message --VS++wcV0S1rZb1Fb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjwds0QACgkQ+rDjkNht5F0pBQCeO2tVCBiOIzu3tbHo0N/nUpjM 1KkAnj8oZIAYTo2V3NAyo2QgOharyhmg =dw+V -----END PGP SIGNATURE----- --VS++wcV0S1rZb1Fb-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message