Preparation for the next patch.

This patch doesn't change the behaviour for upstream, neither
it does for utrace-ptrace.

---

 include/linux/tracehook.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- PU/include/linux/tracehook.h~111_KILL_SOME_PTRACED_CHECKS_IN_H      
2009-10-21 19:20:39.000000000 +0200
+++ PU/include/linux/tracehook.h        2009-10-21 19:46:33.000000000 +0200
@@ -132,7 +132,7 @@ static inline int tracehook_unsafe_exec(
 {
        int unsafe = 0;
        int ptrace = task_ptrace(task);
-       if (ptrace & PT_PTRACED) {
+       if (ptrace) {
                if (ptrace & PT_PTRACE_CAP)
                        unsafe |= LSM_UNSAFE_PTRACE_CAP;
                else
@@ -154,7 +154,7 @@ static inline int tracehook_unsafe_exec(
  */
 static inline struct task_struct *tracehook_tracer_task(struct task_struct 
*tsk)
 {
-       if (task_ptrace(tsk) & PT_PTRACED)
+       if (task_ptrace(tsk))
                return rcu_dereference(tsk->parent);
        return NULL;
 }
@@ -484,7 +484,7 @@ static inline int tracehook_notify_jctl(
 {
        if (task_utrace_flags(current) & UTRACE_EVENT(JCTL))
                utrace_report_jctl(notify, why);
-       return notify ?: (current->ptrace & PT_PTRACED) ? why : 0;
+       return notify ?: task_ptrace(current) ? why : 0;
 }
 
 /**

Reply via email to