]> 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)
commit0c1bb2153da498bc21f7fcf6b7febceeb2b5f50b
treeb01c0dacf941d602dbdce10a105e4bba14ee3949
parent2463ecb7e067c9bf6c9d1bf811f5c9bf4ff7d9be
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: 48840bdd243f ("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