Don't source $ENV unless this is an interactive shell.

This commit is contained in:
Steve Price 1997-05-05 03:45:17 +00:00
parent 542bfc7624
commit 2afa86e799
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=25471

View File

@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
* $Id: main.c,v 1.13 1997/02/22 13:58:33 peter Exp $
*/
#ifndef lint
@ -185,7 +185,7 @@ main(argc, argv)
}
state2:
state = 3;
if (privileged == 0) {
if (!privileged && iflag) {
if ((shinit = lookupvar("ENV")) != NULL && *shinit != '\0') {
state = 3;
read_profile(shinit);