From 0010938b00ae24fbc314f8ba49e76ea23a50efd9 Mon Sep 17 00:00:00 2001 From: Stephen Smalley Date: Sat, 11 Mar 2006 03:27:16 -0800 Subject: [PATCH] --- yaml --- r: 20973 b: refs/heads/master c: 341c2d806b71cc3596afeb2d9bd26cd718e75202 h: refs/heads/master i: 20971: dedb3e10f996eba25b351bfce3c74ca4f2b99234 v: v3 --- [refs] | 2 +- trunk/security/selinux/hooks.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index adaab8873bc3..0e151653daec 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4136cabff33d6d73b8daf2f2612670cc0296f844 +refs/heads/master: 341c2d806b71cc3596afeb2d9bd26cd718e75202 diff --git a/trunk/security/selinux/hooks.c b/trunk/security/selinux/hooks.c index b7773bf68efa..b65c201e9ff5 100644 --- a/trunk/security/selinux/hooks.c +++ b/trunk/security/selinux/hooks.c @@ -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; }