summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_prot.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2012-02-20 22:23:39 +0000
committerguenther <guenther@openbsd.org>2012-02-20 22:23:39 +0000
commit6b6f3ef98bf3daa3aacb6a0b4d990aea236f8b02 (patch)
tree66bfafe6ff3368eb85847153caa021955c73d541 /sys/kern/kern_prot.c
parent- add more ptrace() ops (diff)
downloadwireguard-openbsd-6b6f3ef98bf3daa3aacb6a0b4d990aea236f8b02.tar.xz
wireguard-openbsd-6b6f3ef98bf3daa3aacb6a0b4d990aea236f8b02.zip
First steps for making ptrace work with rthreads:
- move the P_TRACED and P_INEXEC flags, and p_oppid, p_ptmask, and p_ptstat member from struct proc to struct process - sort the PT_* requests into those that take a PID vs those that can also take a TID - stub in PT_GET_THREAD_FIRST and PT_GET_THREAD_NEXT ok kettenis@
Diffstat (limited to 'sys/kern/kern_prot.c')
-rw-r--r--sys/kern/kern_prot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index e936e44970e..95a7c0a2401 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_prot.c,v 1.51 2011/10/15 23:35:29 guenther Exp $ */
+/* $OpenBSD: kern_prot.c,v 1.52 2012/02/20 22:23:39 guenther Exp $ */
/* $NetBSD: kern_prot.c,v 1.33 1996/02/09 18:59:42 christos Exp $ */
/*
@@ -884,7 +884,7 @@ int
proc_cansugid(struct proc *p)
{
/* ptrace(2)d processes shouldn't. */
- if ((p->p_flag & P_TRACED) != 0)
+ if ((p->p_p->ps_flags & PS_TRACED) != 0)
return (0);
/* processes with shared filedescriptors shouldn't. */