From: Seung-Woo Kim Date: Fri, 21 Aug 2020 01:08:34 +0000 (+0900) Subject: Revert "WORKAROUND: security: smack: Allow ptracing even processes in onlycap set" X-Git-Tag: accepted/tizen/unified/20200824.030012^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a51d13fed28dc28eb69c575c660c9f1667a0a57f;p=platform%2Fkernel%2Flinux-rpi.git Revert "WORKAROUND: security: smack: Allow ptracing even processes in onlycap set" This reverts commit 38b1ae4b960c310b02d7d6935b97d289f0326800. Now crash-worker has System::Privileged privilege, so not anymore ptrace related workaround is necessary. So revert the workaround. Change-Id: I42b535e4152eb742df011a5a08324764b49f989a Signed-off-by: Seung-Woo Kim --- diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 7c5adf2..12c0fa8 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -442,8 +442,6 @@ 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