Module Name: src
Committed By: ad
Date: Mon Mar 23 00:46:11 UTC 2020
Modified Files:
src/sys/kern: exec_script.c
Log Message:
LK_SHARED is OK for VOP_ACCESS().
To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 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.81
--- src/sys/kern/exec_script.c:1.80 Sun Sep 15 20:21:12 2019
+++ src/sys/kern/exec_script.c Mon Mar 23 00:46:11 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.81 2020/03/23 00:46:11 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.81 2020/03/23 00:46:11 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