*BSD News Article 83857


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mira.net.au!news.vbc.net!vbcnet-west!garlic.com!uunet!in2.uu.net!144.212.100.12!news.mathworks.com!fu-berlin.de!irz401!orion.sax.de!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Serious brain damage in /bin/sh for FreeBSD 2.1.5
Date: 29 Nov 1996 08:21:56 GMT
Organization: Private BSD site, Dresden
Lines: 20
Message-ID: <57m6f4$2dl@uriah.heep.sax.de>
References: <stanbE1M2D2.38I@netcom.com>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6
X-Phone: +49-351-2012 669
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F  93 21 E0 7D F9 12 D6 4E

stanb@netcom.com (Stan Brown) wrote:

> 	Now I have more problems. The scripts assume that *only* ksh will
> source a file pointed to by the $ENV variable. Well geuss what the FreeBSD

So these scripts are plain broken.  They should not assume this.  It's
Posix-sanctioned to do it.

Good news: the /bin/sh in -current (or the 2.2 release candidate)
knows about ``sh -p'', which is what you're looking for.  It disables
sourcing $ENV.  (Meaning it's a ``privileged'' shell since it's
automatically turned on whenever the shell detects that its UID and
EUID are different.)

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)