patch-2.4.7 linux/arch/alpha/kernel/ptrace.c
Next file: linux/arch/alpha/kernel/time.c
Previous file: linux/arch/alpha/kernel/entry.S
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/alpha/kernel/ptrace.c
- Orig date:
Fri Feb 9 11:29:44 2001
diff -u --recursive --new-file v2.4.6/linux/arch/alpha/kernel/ptrace.c linux/arch/alpha/kernel/ptrace.c
@@ -264,32 +264,7 @@
if (!child)
goto out_notsk;
if (request == PTRACE_ATTACH) {
- ret = -EPERM;
- if (child == current)
- goto out;
- if ((!child->dumpable ||
- (current->uid != child->euid) ||
- (current->uid != child->suid) ||
- (current->uid != child->uid) ||
- (current->gid != child->egid) ||
- (current->gid != child->sgid) ||
- (current->gid != child->gid) ||
- (!cap_issubset(child->cap_permitted, current->cap_permitted)))
- && !capable(CAP_SYS_PTRACE))
- goto out;
- /* the same process cannot be attached many times */
- if (child->ptrace & PT_PTRACED)
- goto out;
- child->ptrace |= PT_PTRACED;
- write_lock_irq(&tasklist_lock);
- if (child->p_pptr != current) {
- REMOVE_LINKS(child);
- child->p_pptr = current;
- SET_LINKS(child);
- }
- write_unlock_irq(&tasklist_lock);
- send_sig(SIGSTOP, child, 1);
- ret = 0;
+ ret = ptrace_attach(child);
goto out;
}
ret = -ESRCH;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)