diff options
author | Christian Weisgerber <naddy@cvs.openbsd.org> | 2019-12-01 18:17:32 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@cvs.openbsd.org> | 2019-12-01 18:17:32 +0000 |
commit | 3c0b50c4c7e0031d3c0c9b2ba7698b5661745799 (patch) | |
tree | 562bdd4165470a47964185f2958d97fc14697a9d /sys/kern | |
parent | ec88c9bfd60fe26dce57eb81d2a126c1c90918ec (diff) |
comply with POSIX and make execve() return EACCES for directories
ok millert@ deraadt@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_exec.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 3af40a9a400..4b3d32e8b8d 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exec.c,v 1.210 2019/11/29 06:34:45 deraadt Exp $ */ +/* $OpenBSD: kern_exec.c,v 1.211 2019/12/01 18:17:31 naddy Exp $ */ /* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */ /*- @@ -125,10 +125,6 @@ check_exec(struct proc *p, struct exec_package *epp) epp->ep_vp = vp = ndp->ni_vp; /* check for regular file */ - if (vp->v_type == VDIR) { - error = EISDIR; - goto bad1; - } if (vp->v_type != VREG) { error = EACCES; goto bad1; |