diff options
author | Lukasz Pawelczyk <l.pawelczyk@partner.samsung.com> | 2014-03-11 17:07:04 +0100 |
---|---|---|
committer | Casey Schaufler <casey@schaufler-ca.com> | 2014-04-11 14:34:17 -0700 |
commit | 959e6c7f1eee42f14d31755b1134f5615db1d9bc (patch) | |
tree | 1931751fc4a9c37635c106498b7c2159e3f6576f /security/smack/smack_lsm.c | |
parent | 55dfc5da1a9b7e623b6f35620c74280555df0288 (diff) |
Smack: fix the subject/object order in smack_ptrace_traceme()
The order of subject/object is currently reversed in
smack_ptrace_traceme(). It is currently checked if the tracee has a
capability to trace tracer and according to this rule a decision is made
whether the tracer will be allowed to trace tracee.
Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@partner.samsung.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Diffstat (limited to 'security/smack/smack_lsm.c')
-rw-r--r-- | security/smack/smack_lsm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index efa42991235..b23fbdd4cda 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -207,11 +207,11 @@ static int smack_ptrace_traceme(struct task_struct *ptp) if (rc != 0) return rc; - skp = smk_of_task(task_security(ptp)); + skp = smk_of_task(current_security()); smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_TASK); smk_ad_setfield_u_tsk(&ad, ptp); - rc = smk_curacc(skp->smk_known, MAY_READWRITE, &ad); + rc = smk_tskacc(ptp, skp->smk_known, MAY_READWRITE, &ad); return rc; } |