*BSD News Article 83909


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!spool.mu.edu!howland.erols.net!netcom.com!stanb
From: stanb@netcom.com (Stan Brown)
Subject: Re: Serious brain damage in /bin/sh for FreeBSD 2.1.5
Message-ID: <stanbE1nxGM.M0L@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
X-Newsreader: NN version 6.5.0 #3 (NOV)
References: <stanbE1M2D2.38I@netcom.com> <57m6f4$2dl@uriah.heep.sax.de>
Date: Sat, 30 Nov 1996 02:55:34 GMT
Lines: 37
Sender: stanb@netcom17.netcom.com

j@uriah.heep.sax.de (J Wunsch) writes:

>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.

	Your mising the point. yes it's OK to do this *if* the shell doing it
	is posix compliant. What's not OK, is doing this with a shell that
	breaks badly on posix style consstructs.

	It's even worse if the sehll doing this is the deafult shell for system
	shell scripts.

>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.)

	No help here. Should I go through and hunt down every system shell
	script and edit it to use this *feature*? Get real.

>-- 
>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. ;-)

-- 
Stan Brown     stanb@netcom.com                                    404-996-6955
Factory Automation Systems
Atlanta Ga.
-- 
Look, look, see Windows 95.  Buy, lemmings, buy!   
Pay no attention to that cliff ahead...            Henry Spencer
(c) 1996 Stan Brown.  Redistribution via the Microsoft Network is prohibited.