patch-2.4.21 linux-2.4.21/kernel/ptrace.c

Next file: linux-2.4.21/kernel/sched.c
Previous file: linux-2.4.21/kernel/printk.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/kernel/ptrace.c linux-2.4.21/kernel/ptrace.c
@@ -21,6 +21,7 @@
  */
 int ptrace_check_attach(struct task_struct *child, int kill)
 {
+
 	if (!(child->ptrace & PT_PTRACED))
 		return -ESRCH;
 
@@ -70,7 +71,7 @@
  	    (current->gid != task->gid)) && !capable(CAP_SYS_PTRACE))
 		goto bad;
 	rmb();
-	if (!task->mm->dumpable && !capable(CAP_SYS_PTRACE))
+	if (!is_dumpable(task) && !capable(CAP_SYS_PTRACE))
 		goto bad;
 	/* the same process cannot be attached many times */
 	if (task->ptrace & PT_PTRACED)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)