summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-08-18 14:35:23 +0000
committerdg <dg@FreeBSD.org>1994-08-18 14:35:23 +0000
commit44fc281f480837836035856eb0af25443f0d2146 (patch)
tree6c211cb67c553b6ab4046e691f661771ea1aebad /bin
parent579d5f05301d930b778eae6f2f741c26e3274bad (diff)
downloadFreeBSD-src-44fc281f480837836035856eb0af25443f0d2146.zip
FreeBSD-src-44fc281f480837836035856eb0af25443f0d2146.tar.gz
Got rid of stupid warning message.
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/exec.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/bin/sh/exec.c b/bin/sh/exec.c
index 30c7f73..64c8790 100644
--- a/bin/sh/exec.c
+++ b/bin/sh/exec.c
@@ -580,15 +580,12 @@ changepath(newval)
int index;
int firstchange;
int bltin;
- int hasdot;
old = pathval();
new = newval;
firstchange = 9999; /* assume no change */
- index = hasdot = 0;
+ index = 0;
bltin = -1;
- if (*new == ':')
- hasdot++;
for (;;) {
if (*old != *new) {
firstchange = index;
@@ -602,17 +599,10 @@ changepath(newval)
if (*new == '%' && bltin < 0 && prefix("builtin", new + 1))
bltin = index;
if (*new == ':') {
- char c = *(new+1);
-
index++;
- if (c == ':' || c == '\0' || (c == '.' &&
- ((c = *(new+2)) == ':' || c == '\0')))
- hasdot++;
}
new++, old++;
}
- if (hasdot && geteuid() == 0)
- out2str("sh: warning: running as root with dot in PATH\n");
if (builtinloc < 0 && bltin >= 0)
builtinloc = bltin; /* zap builtins */
if (builtinloc >= 0 && bltin < 0)
OpenPOWER on IntegriCloud