projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed1febd
)
WORKAROUND: security: smack: Allow ptracing even processes in onlycap set
author
Karol Lewandowski
<k.lewandowsk@samsung.com>
Fri, 7 Aug 2020 11:49:30 +0000
(13:49 +0200)
committer
Hoegeun Kwon
<hoegeun.kwon@samsung.com>
Tue, 30 Mar 2021 01:40:01 +0000
(10:40 +0900)
Change-Id: I708d19703da0f1b83950454fda1362bec7369b5c
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
security/smack/smack_lsm.c
patch
|
blob
|
history
diff --git
a/security/smack/smack_lsm.c
b/security/smack/smack_lsm.c
index
5c90b9f
..
4f4ea64
100644
(file)
--- a/
security/smack/smack_lsm.c
+++ b/
security/smack/smack_lsm.c
@@
-440,6
+440,8
@@
static int smk_ptrace_rule_check(struct task_struct *tracer,
rc = 0;
else if (smack_ptrace_rule == SMACK_PTRACE_DRACONIAN)
rc = -EACCES;
+ else if (smack_ptrace_rule == SMACK_PTRACE_EXACT)
+ rc = capable(CAP_SYS_PTRACE) != 0 ? 0 : -EACCES;
else if (smack_privileged_cred(CAP_SYS_PTRACE, tracercred))
rc = 0;
else