Date: Thu, 01 May 1997 08:57:09 +0100 From: Brian Somers <brian@awfulhak.org> To: Andrew Gierth <andrew@erlenstar.demon.co.uk> Cc: hackers@freebsd.org Subject: Re: /bin/sh -c and ENV Message-ID: <199705010757.IAA25335@awfulhak.demon.co.uk> In-Reply-To: Your message of "01 May 1997 06:23:19 BST." <87rafr6a0o.fsf@erlenstar.demon.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
> Running RELENG-2.2 as of a few days ago.
>
> Just noticed that /bin/sh is executing the ENV file even when invoked with
> the -c option. Is this a bug or a feature? :-)
>
> (Executing the ENV file in calls to system(3) or popen(3) could be considered
> a Bad Thing, even in non-suid programs, and the last system I used where
> system and popen invoked a Posix shell specifically disabled the ENV file
> if the -c option was used.)
This is correct behaviour. RTFM (I hear the masses: WHAT ? FOR SH ?)
There's an example in the man page of how to write ENV files for
interactive use only.
> --
> Andrew.
--
Brian <brian@awfulhak.org>, <brian@freebsd.org>
<http://www.awfulhak.org>
Don't _EVER_ lose your sense of humour....
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705010757.IAA25335>
