diff options
author | 2002-12-31 01:06:15 +0000 | |
---|---|---|
committer | 2002-12-31 01:06:15 +0000 | |
commit | ca5af42764ce8107ff5a313b17d154a9b50cb0f2 (patch) | |
tree | 58d766a9e2e897c695f24d06dc6218e1d36a1ece /lib/libc/gen/exec.c | |
parent | Mention pf rdr rules and anchors. (diff) | |
download | wireguard-openbsd-ca5af42764ce8107ff5a313b17d154a9b50cb0f2.tar.xz wireguard-openbsd-ca5af42764ce8107ff5a313b17d154a9b50cb0f2.zip |
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/gen/exec.c')
-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: |