diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-06-27 15:23:30 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-06-27 15:23:30 +0000 |
commit | b19eea9bd14274e8f2d3dd1e03566e580f2d0173 (patch) | |
tree | cdda3d55eeca0190421df98ff06586afecaa9c42 | |
parent | e9b7cb7902cc8bb5ac9c456c8519103d3e494bcb (diff) |
new ksh code stupidly did not permit ". /dev/null"; enable that again
-rw-r--r-- | bin/ksh/exec.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/bin/ksh/exec.c b/bin/ksh/exec.c index 4e446d0beda..9d0fb9640e2 100644 --- a/bin/ksh/exec.c +++ b/bin/ksh/exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec.c,v 1.11 1998/06/25 19:01:54 millert Exp $ */ +/* $OpenBSD: exec.c,v 1.12 1998/06/27 15:23:29 deraadt Exp $ */ /* * execute command tree @@ -1103,10 +1103,9 @@ search_access(path, mode, errnop) ret = eaccess(path, mode); if (ret < 0) err = errno; /* File exists, but we can't access it */ - else if (!S_ISREG(statb.st_mode) - /* This 'cause access() says root can execute everything */ - || (mode == X_OK - && !(statb.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)))) + else if (mode == X_OK && (!S_ISREG(statb.st_mode) + /* This 'cause access() says root can execute everything */ + || !(statb.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)))) { ret = -1; err = S_ISDIR(statb.st_mode) ? EISDIR : EACCES; |