]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - security/selinux/hooks.c
Pull mca-cleanup into release branch
[linux-2.6-omap-h63xx.git] / security / selinux / hooks.c
index b7773bf68efa8fb104c45312b8a385cbb701d499..b65c201e9ff50386ea6cb43ed2c0c91f63a4cfe7 100644 (file)
@@ -1262,7 +1262,7 @@ static int selinux_ptrace(struct task_struct *parent, struct task_struct *child)
 
        rc = task_has_perm(parent, child, PROCESS__PTRACE);
        /* Save the SID of the tracing process for later use in apply_creds. */
-       if (!rc)
+       if (!(child->ptrace & PT_PTRACED) && !rc)
                csec->ptrace_sid = psec->sid;
        return rc;
 }