diff options
author | James Morris <james.l.morris@oracle.com> | 2013-05-12 21:28:38 +1000 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2013-05-12 21:28:38 +1000 |
commit | bd71164abc141ea696014e3e23c561b0d7f1b434 (patch) | |
tree | 3b9c64698800566197bf4ecec604ba8bb1228bd3 /security/apparmor/ipc.c | |
parent | f722406faae2d073cc1d01063d1123c35425939e (diff) | |
parent | 2654bfbc2bd0e1e64f0b257c21da23f6cec32c6c (diff) |
Merge tag 'aa-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor into ra-next
Diffstat (limited to 'security/apparmor/ipc.c')
-rw-r--r-- | security/apparmor/ipc.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/security/apparmor/ipc.c b/security/apparmor/ipc.c index cf1071b14232..c51d2266587e 100644 --- a/security/apparmor/ipc.c +++ b/security/apparmor/ipc.c @@ -95,23 +95,18 @@ int aa_ptrace(struct task_struct *tracer, struct task_struct *tracee, * - tracer profile has CAP_SYS_PTRACE */ - struct aa_profile *tracer_p; - /* cred released below */ - const struct cred *cred = get_task_cred(tracer); + struct aa_profile *tracer_p = aa_get_task_profile(tracer); int error = 0; - tracer_p = aa_cred_profile(cred); if (!unconfined(tracer_p)) { - /* lcred released below */ - const struct cred *lcred = get_task_cred(tracee); - struct aa_profile *tracee_p = aa_cred_profile(lcred); + struct aa_profile *tracee_p = aa_get_task_profile(tracee); error = aa_may_ptrace(tracer, tracer_p, tracee_p, mode); error = aa_audit_ptrace(tracer_p, tracee_p, error); - put_cred(lcred); + aa_put_profile(tracee_p); } - put_cred(cred); + aa_put_profile(tracer_p); return error; } |