summaryrefslogtreecommitdiff
path: root/sys/miscfs/procfs
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-03-09 01:34:01 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-03-09 01:34:01 +0000
commit11820976fc09e613dd88eebdd9a7e6a5b73471ab (patch)
treed61577ac6c10e2111c920e9de4535648d81c1171 /sys/miscfs/procfs
parent5c66c78b07f34ed9acddc827ceb266aae6caeac4 (diff)
Disallow ptrace if P_SUGIDEXEC flag is set (we already disallow if P_SUGID
is set). deraadt@ and tholo@ OK.
Diffstat (limited to 'sys/miscfs/procfs')
-rw-r--r--sys/miscfs/procfs/procfs_mem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/miscfs/procfs/procfs_mem.c b/sys/miscfs/procfs/procfs_mem.c
index a06866f537a..ba3f320945e 100644
--- a/sys/miscfs/procfs/procfs_mem.c
+++ b/sys/miscfs/procfs/procfs_mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_mem.c,v 1.17 2002/01/30 20:45:35 nordin Exp $ */
+/* $OpenBSD: procfs_mem.c,v 1.18 2003/03/09 01:34:00 millert Exp $ */
/* $NetBSD: procfs_mem.c,v 1.8 1996/02/09 22:40:50 christos Exp $ */
/*
@@ -112,6 +112,7 @@ procfs_checkioperm(p, t)
int error;
if ((t->p_cred->p_ruid != p->p_cred->p_ruid ||
+ ISSET(t->p_flag, P_SUGIDEXEC) ||
ISSET(t->p_flag, P_SUGID)) &&
(error = suser(p->p_ucred, &p->p_acflag)) != 0)
return (error);