From owner-freebsd-hackers Wed Apr 30 22:27:01 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id WAA10530 for hackers-outgoing; Wed, 30 Apr 1997 22:27:01 -0700 (PDT) Received: from punt-1.mail.demon.net (relay-7.mail.demon.net [194.217.242.9]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id WAA10525 for ; Wed, 30 Apr 1997 22:26:59 -0700 (PDT) Received: from erlenstar.demon.co.uk ([194.222.144.22]) by punt-1.mail.demon.net id ag0500489; 1 May 97 6:23 BST Received: (from andrew@localhost) by erlenstar.demon.co.uk (8.8.5/8.8.5) id GAA03172; Thu, 1 May 1997 06:23:19 +0100 (BST) To: hackers@freebsd.org Subject: /bin/sh -c and ENV From: Andrew Gierth X-Mayan-Date: Long count = 12.19.4.2.5; tzolkin = 9 Chicchan; haab = 3 Uo X-Attribution: AG Date: 01 May 1997 06:23:19 +0100 Message-ID: <87rafr6a0o.fsf@erlenstar.demon.co.uk> Lines: 12 X-Mailer: Gnus v5.3/Emacs 19.34 Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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.) -- Andrew.