From 4d6d3cf8955c3255a348eeb81fd4936c79d684bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A2=E9=9F=AC?= Date: Tue, 14 Feb 2023 03:47:59 +0000 Subject: [PATCH] test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 卢韬 --- security/selinux/hooks.c | 1 + security/selinux/ss/services.c | 1 + 2 files changed, 2 insertions(+) diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 662f7b4a9516..1e205a3c165e 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -6452,6 +6452,7 @@ static int selinux_setprocattr(const char *name, void *value, size_t size) /* Only allow single threaded processes to change context */ error = -EPERM; if (!current_is_single_threaded()) { + audit_log(audit_context(), GFP_ATOMIC, AUDIT_SELINUX_ERR, "lutao current is not single_threaded!"); error = security_bounded_transition(&selinux_state, tsec->sid, sid); if (error) diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index 31d631fa846e..e5148ebdc1dd 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -910,6 +910,7 @@ int security_bounded_transition(struct selinux_state *state, /* not bounded anymore */ rc = -EPERM; if (!type->bounds) + audit_log(audit_context(), GFP_ATOMIC, AUDIT_SELINUX_ERR, "lutao not bounded anymore!"); break; /* @newsid is bounded by @oldsid */ -- Gitee