summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorCasey Schaufler <casey@schaufler-ca.com>2013-10-22 11:47:45 -0700
committerŁukasz Stelmach <l.stelmach@samsung.com>2013-12-20 11:11:58 +0100
commitdfb6577817caddd151dda1c4a3be2d2b314fba57 (patch)
treea8cb9972454b75cdba68af93a633a281236c35a2 /security
parent96c833ab84c190078efd6b24d9bb6ee6514d2d02 (diff)
downloadlinux-3.10-dfb6577817caddd151dda1c4a3be2d2b314fba57.tar.gz
linux-3.10-dfb6577817caddd151dda1c4a3be2d2b314fba57.tar.bz2
linux-3.10-dfb6577817caddd151dda1c4a3be2d2b314fba57.zip
Smack: Ptrace access check mode
When the ptrace security hooks were split the addition of a mode parameter was not taken advantage of in the Smack ptrace access check. This changes the access check from always looking for read and write access to using the passed mode. This will make use of /proc much happier. Targeted for git://git.gitorious.org/smack-next/kernel.git Change-Id: I979f36da1b26d0fba5d73744f340422aaae5cc74 Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Diffstat (limited to 'security')
-rw-r--r--security/smack/smack_lsm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index 88d366e5579..b0be893ad44 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -185,7 +185,7 @@ static int smack_ptrace_access_check(struct task_struct *ctp, unsigned int mode)
smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_TASK);
smk_ad_setfield_u_tsk(&ad, ctp);
- rc = smk_curacc(skp->smk_known, MAY_READWRITE, &ad);
+ rc = smk_curacc(skp->smk_known, mode, &ad);
return rc;
}