summaryrefslogtreecommitdiffstats
path: root/sys/miscfs/procfs
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2011-04-02 17:04:35 +0000
committerguenther <guenther@openbsd.org>2011-04-02 17:04:35 +0000
commitbfb8af8fd908165924c3da75dcad45cbc5d95125 (patch)
tree2ff87f12229de930c37445002878d332e70862ac /sys/miscfs/procfs
parentConstrain the buffer cache to use only the dma reachable region of memory. (diff)
downloadwireguard-openbsd-bfb8af8fd908165924c3da75dcad45cbc5d95125.tar.xz
wireguard-openbsd-bfb8af8fd908165924c3da75dcad45cbc5d95125.zip
Move P_SUGID and P_SUGIDEXEC from struct proc to struct process, so
that you can't evade the checks by doing the dirty work in an rthread ok blambert@, deraadt@
Diffstat (limited to 'sys/miscfs/procfs')
-rw-r--r--sys/miscfs/procfs/procfs_vnops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c
index da9edb7c185..5ef2fb8bae9 100644
--- a/sys/miscfs/procfs/procfs_vnops.c
+++ b/sys/miscfs/procfs/procfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_vnops.c,v 1.50 2010/12/21 20:14:43 thib Exp $ */
+/* $OpenBSD: procfs_vnops.c,v 1.51 2011/04/02 17:04:35 guenther Exp $ */
/* $NetBSD: procfs_vnops.c,v 1.40 1996/03/16 23:52:55 christos Exp $ */
/*
@@ -461,7 +461,7 @@ procfs_getattr(void *v)
* privilege, then rip away read/write permission so
* that only root can gain access.
*/
- if (procp->p_flag & P_SUGID)
+ if (procp->p_p->ps_flags & PS_SUGID)
vap->va_mode &= ~(S_IRUSR|S_IWUSR);
/* FALLTHROUGH */
case Pctl: