diff options
| author | ad <ad@NetBSD.org> | 2020-03-23 00:46:11 +0000 |
|---|---|---|
| committer | ad <ad@NetBSD.org> | 2020-03-23 00:46:11 +0000 |
| commit | f05cc6dcaed2489546fccec1ee51ee8cf631fe97 (patch) | |
| tree | 48f54a68ef94a5a5fbda7862b54ba41b3479f5a6 /sys/kern/exec_script.c | |
| parent | 2387535d9cce65750fcf660ee5afa0d1d9cde449 (diff) | |
LK_SHARED is OK for VOP_ACCESS().
Diffstat (limited to 'sys/kern/exec_script.c')
| -rw-r--r-- | sys/kern/exec_script.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/exec_script.c b/sys/kern/exec_script.c index 6ac9624fd81..df39d8d7c10 100644 --- a/sys/kern/exec_script.c +++ b/sys/kern/exec_script.c @@ -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 |
