diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-04-02 17:04:36 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-04-02 17:04:36 +0000 |
commit | 99a2057acb47dac10d8566bc4ab6a117de267634 (patch) | |
tree | 1901b960139f21d0cb0248fa97c5c61ccfe5bb17 /sys/miscfs | |
parent | 11ae302ebcf8bbe27cb1c13a64dce31c551cdac8 (diff) |
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')
-rw-r--r-- | sys/miscfs/procfs/procfs_vnops.c | 4 |
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: |