summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-12-31 01:06:16 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-12-31 01:06:16 +0000
commitecce63524c20a2283b7b5d87afe727f3ab5b0aff (patch)
treec8b8ebe2d57bd23ba00d40e46b9d73c5b7dfab63 /lib/libc
parent4f69009f40525de8e2b013a934552bbfe05b36fb (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.c3
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: