From c1c6fa7b04175d1255e543345d0ffcf6cee44dca Mon Sep 17 00:00:00 2001 From: tedu Date: Sun, 25 Jan 2015 19:31:38 +0000 Subject: [PATCH] mention that the kern.global_ptrace sysctl also affects PT_ATTACH --- lib/libc/sys/ptrace.2 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/libc/sys/ptrace.2 b/lib/libc/sys/ptrace.2 index 3af57a3967e..648a191286f 100644 --- a/lib/libc/sys/ptrace.2 +++ b/lib/libc/sys/ptrace.2 @@ -1,8 +1,8 @@ -.\" $OpenBSD: ptrace.2,v 1.30 2014/11/16 18:52:27 jmc Exp $ +.\" $OpenBSD: ptrace.2,v 1.31 2015/01/25 19:31:38 tedu Exp $ .\" $NetBSD: ptrace.2,v 1.3 1996/02/23 01:39:41 jtc Exp $ .\" .\" This file is in the public domain. -.Dd $Mdocdate: November 16 2014 $ +.Dd $Mdocdate: January 25 2015 $ .Dt PTRACE 2 .Os .Sh NAME @@ -164,6 +164,10 @@ arguments are ignored. This request requires that the target process must have the same real UID as the tracing process, and that it must not be executing a set-user-ID or set-group-ID executable. +Additionally, if the +.Dv kern.global_ptrace +sysctl is 0, then the target process must be a descendent of the tracing +process. (If the tracing process is running as root, these restrictions do not apply.) The tracing process will see the newly traced process stop and may then control it as if it had been traced all along. -- 2.20.1