summaryrefslogtreecommitdiffstats
path: root/bin/csh
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1995-07-07 22:45:26 +0000
committerache <ache@FreeBSD.org>1995-07-07 22:45:26 +0000
commit8656368e5c75ef30c04c97a543f86377b719b0d4 (patch)
tree413288aa438e39438f28e4fd7dda38d3348c646f /bin/csh
parent6a877cbd09b614ca272004618607ff4dd7d62976 (diff)
downloadFreeBSD-src-8656368e5c75ef30c04c97a543f86377b719b0d4.zip
FreeBSD-src-8656368e5c75ef30c04c97a543f86377b719b0d4.tar.gz
Produce importpath warning only for true interactive shells,
close PR 598
Diffstat (limited to 'bin/csh')
-rw-r--r--bin/csh/csh.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/csh/csh.c b/bin/csh/csh.c
index f6a24e3..d43fb61 100644
--- a/bin/csh/csh.c
+++ b/bin/csh/csh.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: csh.c,v 1.2 1994/09/24 02:53:51 davidg Exp $
+ * $Id: csh.c,v 1.3 1995/05/30 00:06:30 rgrimes Exp $
*/
#ifndef lint
@@ -618,7 +618,8 @@ importpath(cp)
for (;;) {
if ((c = *dp) == ':' || c == 0) {
*dp = 0;
- if ((*cp != '/' || *cp == '\0') && (euid == 0 || uid == 0))
+ if ((*cp != '/' || *cp == '\0') && (euid == 0 || uid == 0) &&
+ (intact || intty && isatty(SHOUT)))
(void) fprintf(csherr,
"Warning: imported path contains relative components\n");
pv[i++] = Strsave(*cp ? cp : STRdot);
OpenPOWER on IntegriCloud