aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_exec.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2019-08-03 01:02:52 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2019-08-03 01:02:52 +0000
commitf422bc30926c9febfd83df43ff492f38f071fd93 (patch)
tree9773cb3b565512a5ce776b55697f92c94df4fb81 /sys/kern/kern_exec.c
parentdfb39567a2649def493b71714a4e76db1a92d5d8 (diff)
downloadsrc-f422bc30926c9febfd83df43ff492f38f071fd93.tar.gz
src-f422bc30926c9febfd83df43ff492f38f071fd93.zip
Set ISOPEN in namei flags when opening executable interpreters.
These vnodes are explicitly opened via VOP_OPEN via exec_check_permissions identical to the main exectuable image. Setting ISOPEN allows filesystems to perform suitable checks in VOP_LOOKUP (e.g. close-to-open consistency in the NFS client). Reviewed by: kib MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D21129
Notes
Notes: svn path=/head/; revision=350549
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r--sys/kern/kern_exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 50d4f8b585a4..e129f9238f18 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -639,7 +639,7 @@ interpret:
free(imgp->freepath, M_TEMP);
imgp->freepath = NULL;
/* set new name to that of the interpreter */
- NDINIT(&nd, LOOKUP, LOCKLEAF | FOLLOW | SAVENAME,
+ NDINIT(&nd, LOOKUP, ISOPEN | LOCKLEAF | FOLLOW | SAVENAME,
UIO_SYSSPACE, imgp->interpreter_name, td);
args->fname = imgp->interpreter_name;
goto interpret;