diff options
author | ache <ache@FreeBSD.org> | 1995-07-07 23:13:11 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1995-07-07 23:13:11 +0000 |
commit | bd0186909e167e5650e2c8560baf031414724ff0 (patch) | |
tree | d9c7f7918d05bbd70fd6f92a5361123008a4e9ef /bin/csh/set.c | |
parent | 8656368e5c75ef30c04c97a543f86377b719b0d4 (diff) | |
download | FreeBSD-src-bd0186909e167e5650e2c8560baf031414724ff0.zip FreeBSD-src-bd0186909e167e5650e2c8560baf031414724ff0.tar.gz |
Do the same check for interactive shell (PATH warning)
like in csh.c
Diffstat (limited to 'bin/csh/set.c')
-rw-r--r-- | bin/csh/set.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/csh/set.c b/bin/csh/set.c index 7d03ac9..f1b5532 100644 --- a/bin/csh/set.c +++ b/bin/csh/set.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: set.c,v 1.2 1994/09/24 02:54:16 davidg Exp $ + * $Id: set.c,v 1.3 1995/05/30 00:06:38 rgrimes Exp $ */ #ifndef lint @@ -664,7 +664,8 @@ exportpath(val) "Warning: ridiculously long PATH truncated\n"); break; } - if ((**val != '/' || **val == '\0') && (euid == 0 || uid == 0)) + if (**val != '/' && (euid == 0 || uid == 0) && + (intact || intty && isatty(SHOUT))) (void) fprintf(csherr, "Warning: exported path contains relative components.\n"); (void) Strcat(exppath, *val++); |