patch-2.4.7 linux/arch/m68k/kernel/ptrace.c
Next file: linux/arch/mips/kernel/ptrace.c
Previous file: linux/arch/ia64/kernel/ptrace.c
Back to the patch index
Back to the overall index
- Lines: 34
- Date:
Fri Jul 20 12:39:55 2001
- Orig file:
v2.4.6/linux/arch/m68k/kernel/ptrace.c
- Orig date:
Tue Jul 3 17:08:18 2001
diff -u --recursive --new-file v2.4.6/linux/arch/m68k/kernel/ptrace.c linux/arch/m68k/kernel/ptrace.c
@@ -118,32 +118,7 @@
goto out_tsk;
if (request == PTRACE_ATTACH) {
- if (child == current)
- goto out_tsk;
- if ((!child->dumpable ||
- (current->uid != child->euid) ||
- (current->uid != child->suid) ||
- (current->uid != child->uid) ||
- (current->gid != child->egid) ||
- (current->gid != child->sgid) ||
- (!cap_issubset(child->cap_permitted, current->cap_permitted)) ||
- (current->gid != child->gid)) && !capable(CAP_SYS_PTRACE))
- goto out_tsk;
- /* the same process cannot be attached many times */
- if (child->ptrace & PT_PTRACED)
- goto out_tsk;
- child->ptrace |= PT_PTRACED;
-
- write_lock_irqsave(&tasklist_lock, flags);
- if (child->p_pptr != current) {
- REMOVE_LINKS(child);
- child->p_pptr = current;
- SET_LINKS(child);
- }
- write_unlock_irqrestore(&tasklist_lock, flags);
-
- send_sig(SIGSTOP, child, 1);
- ret = 0;
+ ret = ptrace_attach(child);
goto out_tsk;
}
ret = -ESRCH;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)