patch-2.4.4 linux/arch/sh/kernel/ptrace.c
Next file: linux/arch/sh/kernel/rtc.c
Previous file: linux/arch/sh/kernel/process.c
Back to the patch index
Back to the overall index
- Lines: 19
- Date:
Wed Apr 11 21:24:52 2001
- Orig file:
v2.4.3/linux/arch/sh/kernel/ptrace.c
- Orig date:
Fri Dec 29 14:07:20 2000
diff -u --recursive --new-file v2.4.3/linux/arch/sh/kernel/ptrace.c linux/arch/sh/kernel/ptrace.c
@@ -175,14 +175,16 @@
if (request == PTRACE_ATTACH) {
if (child == tsk)
goto out_tsk;
- if ((!child->dumpable ||
- (tsk->uid != child->euid) ||
+ if(((tsk->uid != child->euid) ||
(tsk->uid != child->suid) ||
(tsk->uid != child->uid) ||
(tsk->gid != child->egid) ||
(tsk->gid != child->sgid) ||
(!cap_issubset(child->cap_permitted, tsk->cap_permitted)) ||
(tsk->gid != child->gid)) && !capable(CAP_SYS_PTRACE))
+ goto out_tsk;
+ rmb();
+ if (!child->dumpable && !capable(CAP_SYS_PTRACE))
goto out_tsk;
/* the same process cannot be attached many times */
if (child->ptrace & PT_PTRACED)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)