]> git.baikalelectronics.ru Git - kernel.git/commit
selinux: don't log MAC_POLICY_LOAD record on failed policy load
authorOndrej Mosnacek <omosnace@redhat.com>
Thu, 18 Mar 2021 21:53:01 +0000 (22:53 +0100)
committerPaul Moore <paul@paul-moore.com>
Fri, 19 Mar 2021 03:13:04 +0000 (23:13 -0400)
commit64d300cbe4cb87c9de84c9413123c43b258ac8cb
treeb01c0dacf941d602dbdce10a105e4bba14ee3949
parent30ab135423174fd2afa8ba13c12233ae47c880f6
selinux: don't log MAC_POLICY_LOAD record on failed policy load

If sel_make_policy_nodes() fails, we should jump to 'out', not 'out1',
as the latter would incorrectly log an MAC_POLICY_LOAD audit record,
even though the policy hasn't actually been reloaded. The 'out1' jump
label now becomes unused and can be removed.

Fixes: 0df004932a15 ("selinux: move policy commit after updating selinuxfs")
Cc: stable@vger.kernel.org
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/selinuxfs.c