diff options
author | Lukasz Pawelczyk <l.pawelczyk@partner.samsung.com> | 2014-03-11 12:07:04 -0400 |
---|---|---|
committer | Casey Schaufler <casey@schaufler-ca.com> | 2014-04-11 17:34:17 -0400 |
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 efa42991235e..b23fbdd4cdad 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) | |||
207 | if (rc != 0) | 207 | if (rc != 0) |
208 | return rc; | 208 | return rc; |
209 | 209 | ||
210 | skp = smk_of_task(task_security(ptp)); | 210 | skp = smk_of_task(current_security()); |
211 | smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_TASK); | 211 | smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_TASK); |
212 | smk_ad_setfield_u_tsk(&ad, ptp); | 212 | smk_ad_setfield_u_tsk(&ad, ptp); |
213 | 213 | ||
214 | rc = smk_curacc(skp->smk_known, MAY_READWRITE, &ad); | 214 | rc = smk_tskacc(ptp, skp->smk_known, MAY_READWRITE, &ad); |
215 | return rc; | 215 | return rc; |
216 | } | 216 | } |
217 | 217 | ||