diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-12-31 01:06:16 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-12-31 01:06:16 +0000 |
commit | ecce63524c20a2283b7b5d87afe727f3ab5b0aff (patch) | |
tree | c8b8ebe2d57bd23ba00d40e46b9d73c5b7dfab63 /lib/libc | |
parent | 4f69009f40525de8e2b013a934552bbfe05b36fb (diff) |
Catch EISDIR in execvp() and friends so that if a directory appears
in PATH that matches the name to be executed we skip it; Andy Isaacson
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/exec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/gen/exec.c b/lib/libc/gen/exec.c index b47f3b15b04..4a6c5effbd8 100644 --- a/lib/libc/gen/exec.c +++ b/lib/libc/gen/exec.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: exec.c,v 1.13 2002/07/30 00:15:13 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: exec.c,v 1.14 2002/12/31 01:06:15 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -212,6 +212,7 @@ retry: (void)execve(bp, argv, environ); switch(errno) { case E2BIG: goto done; + case EISDIR: case ELOOP: case ENAMETOOLONG: case ENOENT: |