Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern LK_SHARED is OK for VOP_ACCESS().



details:   https://anonhg.NetBSD.org/src/rev/10ea60ac99f9
branches:  trunk
changeset: 746153:10ea60ac99f9
user:      ad <ad%NetBSD.org@localhost>
date:      Mon Mar 23 00:46:11 2020 +0000

description:
LK_SHARED is OK for VOP_ACCESS().

diffstat:

 sys/kern/exec_script.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 2a859bec7476 -r 10ea60ac99f9 sys/kern/exec_script.c
--- a/sys/kern/exec_script.c    Mon Mar 23 00:37:19 2020 +0000
+++ b/sys/kern/exec_script.c    Mon Mar 23 00:46:11 2020 +0000
@@ -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 @@
         * 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



Home | Main Index | Thread Index | Old Index