--- zzzz-none-000/linux-2.6.19.2/kernel/ptrace.c 2007-01-10 19:10:37.000000000 +0000 +++ davinci-8020-5504/linux-2.6.19.2/kernel/ptrace.c 2007-01-19 14:42:56.000000000 +0000 @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -137,12 +138,12 @@ (current->uid != task->uid) || (current->gid != task->egid) || (current->gid != task->sgid) || - (current->gid != task->gid)) && !capable(CAP_SYS_PTRACE)) + (current->gid != task->gid)) && !capable_nolog(CAP_SYS_PTRACE)) return -EPERM; smp_rmb(); if (task->mm) dumpable = task->mm->dumpable; - if (!dumpable && !capable(CAP_SYS_PTRACE)) + if (!dumpable && !capable_nolog(CAP_SYS_PTRACE)) return -EPERM; return security_ptrace(current, task); @@ -477,6 +478,11 @@ if (ret < 0) goto out_put_task_struct; + if (gr_handle_ptrace(child, request)) { + ret = -EPERM; + goto out_put_task_struct; + } + ret = arch_ptrace(child, request, addr, data); if (ret < 0) goto out_put_task_struct;