summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2007-05-31 20:47:44 +0000
committerotto <otto@openbsd.org>2007-05-31 20:47:44 +0000
commit1d5f25d3be553b93f20a66012c5144358a6549b9 (patch)
tree27978893faaa107d65174ca1ff862a208a1c20de
parentunlink the right state, ryan ok (diff)
downloadwireguard-openbsd-1d5f25d3be553b93f20a66012c5144358a6549b9.tar.xz
wireguard-openbsd-1d5f25d3be553b93f20a66012c5144358a6549b9.zip
Only process ENV when in interactive mode as SU says. Started by
tedu to fix make -j, SU thing spotted by naddy@; ok millert@ @tedu jmc@ for the man page bit.
-rw-r--r--bin/ksh/ksh.17
-rw-r--r--bin/ksh/main.c4
-rw-r--r--bin/ksh/sh.15
3 files changed, 8 insertions, 8 deletions
diff --git a/bin/ksh/ksh.1 b/bin/ksh/ksh.1
index afed6a6e1a0..47bfc5e5185 100644
--- a/bin/ksh/ksh.1
+++ b/bin/ksh/ksh.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ksh.1,v 1.119 2007/05/31 19:19:14 jmc Exp $
+.\" $OpenBSD: ksh.1,v 1.120 2007/05/31 20:47:44 otto Exp $
.\"
.\" Public Domain
.\"
@@ -161,7 +161,8 @@ otherwise, the basename the shell was called with (i.e. argv[0]) is used.
.Pp
If the
.Ev ENV
-parameter is set when the shell starts (or, in the case of login shells,
+parameter is set when an interactive shell starts (or,
+in the case of login shells,
after any profiles are processed), its value is subjected to parameter,
command, arithmetic, and tilde
.Pq Sq ~
@@ -181,9 +182,7 @@ may be set and exported (see below) in
is then free to specify instructions for interactive shells.
For example, the global configuration file may be sourced:
.Bd -literal -offset indent
-if [ -o interactive ]; then
\&. /etc/ksh.kshrc
-fi
.Ed
.Pp
The above strategy may be employed to keep
diff --git a/bin/ksh/main.c b/bin/ksh/main.c
index 1ea14423b3e..74c843cd50b 100644
--- a/bin/ksh/main.c
+++ b/bin/ksh/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.42 2006/11/02 18:21:20 ray Exp $ */
+/* $OpenBSD: main.c,v 1.43 2007/05/31 20:47:44 otto Exp $ */
/*
* startup, main loop, environments and error handling
@@ -339,7 +339,7 @@ main(int argc, char *argv[])
if (Flag(FPRIVILEGED))
include("/etc/suid_profile", 0, (char **) 0, 1);
- else {
+ else if (Flag(FTALKING)) {
char *env_file;
/* include $ENV */
diff --git a/bin/ksh/sh.1 b/bin/ksh/sh.1
index 58ad4b58006..675773490b8 100644
--- a/bin/ksh/sh.1
+++ b/bin/ksh/sh.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sh.1,v 1.74 2007/05/31 19:19:14 jmc Exp $
+.\" $OpenBSD: sh.1,v 1.75 2007/05/31 20:47:44 otto Exp $
.\"
.\" Public Domain
.\"
@@ -158,7 +158,8 @@ otherwise, the basename the shell was called with (i.e. argv[0]) is used.
.Pp
If the
.Ev ENV
-parameter is set when the shell starts (or, in the case of login shells,
+parameter is set when an interactive shell starts (or,
+in the case of login shells,
after any profiles are processed), its value is subjected to parameter,
command, arithmetic, and tilde
.Pq Sq ~