Module Name: src Committed By: ad Date: Fri Jan 17 21:53:01 UTC 2020
Modified Files: src/sys/kern [ad-namecache]: exec_script.c Log Message: LK_SHARED for VOP_ACCESS(). To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.80.2.1 src/sys/kern/exec_script.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/exec_script.c diff -u src/sys/kern/exec_script.c:1.80 src/sys/kern/exec_script.c:1.80.2.1 --- src/sys/kern/exec_script.c:1.80 Sun Sep 15 20:21:12 2019 +++ src/sys/kern/exec_script.c Fri Jan 17 21:53:01 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_script.c,v 1.80 2019/09/15 20:21:12 christos Exp $ */ +/* $NetBSD: exec_script.c,v 1.80.2.1 2020/01/17 21:53:01 ad Exp $ */ /* * Copyright (c) 1993, 1994, 1996 Christopher G. Demetriou @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: exec_script.c,v 1.80 2019/09/15 20:21:12 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: exec_script.c,v 1.80.2.1 2020/01/17 21:53:01 ad Exp $"); #ifdef _KERNEL_OPT #include "opt_script.h" @@ -216,7 +216,7 @@ check_shell: * close all open fd's when the start. That kills this * method of implementing "safe" set-id and x-only scripts. */ - vn_lock(epp->ep_vp, LK_EXCLUSIVE | LK_RETRY); + vn_lock(epp->ep_vp, LK_SHARED | LK_RETRY); error = VOP_ACCESS(epp->ep_vp, VREAD, l->l_cred); VOP_UNLOCK(epp->ep_vp); if (error == EACCES