Page MenuHomeFreeBSD

D3908.diff
No OneTemporary

D3908.diff

Index: head/sys/kern/sys_process.c
===================================================================
--- head/sys/kern/sys_process.c
+++ head/sys/kern/sys_process.c
@@ -744,7 +744,18 @@
*/
switch (req) {
case PT_TRACE_ME:
- /* Always legal. */
+ /*
+ * Always legal, when there is a parent process which
+ * could trace us. Otherwise, reject.
+ */
+ if ((p->p_flag & P_TRACED) != 0) {
+ error = EBUSY;
+ goto fail;
+ }
+ if (p->p_pptr == initproc) {
+ error = EPERM;
+ goto fail;
+ }
break;
case PT_ATTACH:

File Metadata

Mime Type
text/plain
Expires
Fri, Feb 27, 7:35 PM (12 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29040107
Default Alt Text
D3908.diff (544 B)

Event Timeline