Module Name:    src
Committed By:   martin
Date:           Fri Jun 17 15:27:10 UTC 2022

Modified Files:
        src/sys/miscfs/procfs [netbsd-8]: procfs_vnops.c

Log Message:
Pull up following revision(s) (requested by shm in ticket #1748):

        sys/miscfs/procfs/procfs_vnops.c: revision 1.229

Add missing permission check


To generate a diff of this commit:
cvs rdiff -u -r1.197.2.3 -r1.197.2.4 src/sys/miscfs/procfs/procfs_vnops.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/miscfs/procfs/procfs_vnops.c
diff -u src/sys/miscfs/procfs/procfs_vnops.c:1.197.2.3 src/sys/miscfs/procfs/procfs_vnops.c:1.197.2.4
--- src/sys/miscfs/procfs/procfs_vnops.c:1.197.2.3	Thu Aug 29 16:28:47 2019
+++ src/sys/miscfs/procfs/procfs_vnops.c	Fri Jun 17 15:27:10 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_vnops.c,v 1.197.2.3 2019/08/29 16:28:47 martin Exp $	*/
+/*	$NetBSD: procfs_vnops.c,v 1.197.2.4 2022/06/17 15:27:10 martin Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -105,7 +105,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.197.2.3 2019/08/29 16:28:47 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.197.2.4 2022/06/17 15:27:10 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1040,6 +1040,9 @@ procfs_lookup(void *v)
 
 	*vpp = NULL;
 
+	if ((error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred)) != 0)
+		return (error);
+
 	if (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)
 		return (EROFS);
 

Reply via email to