From: Elena Reshetova Date: Mon, 11 Nov 2013 10:37:38 +0000 (+0200) Subject: Subject: [PATCH] Smack: Ptrace access check mode X-Git-Url: http://review.tizen.org/git/?p=platform%2Fkernel%2Fkernel-mfld-blackbay.git;a=commitdiff_plain;h=98b1a4a07faf0afeec7943e6a338415f620a0055 Subject: [PATCH] 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: Ia3dfc1ec16f922e03fd5e52861df516e00b0a45e Signed-off-by: Casey Schaufler --- diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 05bfc99..e0b7c26 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -171,7 +171,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(tsp, MAY_READWRITE, &ad); + rc = smk_curacc(tsp, mode, &ad); return rc; }