diff options
Diffstat (limited to 'patches.tizen/1056-Smack-Ptrace-access-check-mode.patch')
-rw-r--r-- | patches.tizen/1056-Smack-Ptrace-access-check-mode.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/patches.tizen/1056-Smack-Ptrace-access-check-mode.patch b/patches.tizen/1056-Smack-Ptrace-access-check-mode.patch new file mode 100644 index 00000000000..040816a2fce --- /dev/null +++ b/patches.tizen/1056-Smack-Ptrace-access-check-mode.patch @@ -0,0 +1,40 @@ +From dfb6577817caddd151dda1c4a3be2d2b314fba57 Mon Sep 17 00:00:00 2001 +From: Casey Schaufler <casey@schaufler-ca.com> +Date: Tue, 22 Oct 2013 11:47:45 -0700 +Subject: [PATCH 1056/1302] Smack: Ptrace access check mode +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +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> +Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> +--- + security/smack/smack_lsm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c +index 88d366e5..b0be893 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; + } + +-- +1.8.3.2 + |