Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/miscfs/procfs Pull up following revision(s) (requeste...



details:   https://anonhg.NetBSD.org/src/rev/5c54c9e16788
branches:  netbsd-9
changeset: 366824:5c54c9e16788
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Jun 17 15:25:21 2022 +0000

description:
Pull up following revision(s) (requested by shm in ticket #1475):

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

Add missing permission check

diffstat:

 sys/miscfs/procfs/procfs_vnops.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r aa51adf616b0 -r 5c54c9e16788 sys/miscfs/procfs/procfs_vnops.c
--- a/sys/miscfs/procfs/procfs_vnops.c  Thu Jun 16 14:23:27 2022 +0000
+++ b/sys/miscfs/procfs/procfs_vnops.c  Fri Jun 17 15:25:21 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: procfs_vnops.c,v 1.206.4.1 2019/09/01 11:02:27 martin Exp $    */
+/*     $NetBSD: procfs_vnops.c,v 1.206.4.2 2022/06/17 15:25:21 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.206.4.1 2019/09/01 11:02:27 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.206.4.2 2022/06/17 15:25:21 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1022,6 +1022,9 @@
 
        *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);
 



Home | Main Index | Thread Index | Old Index