From 4b986f5a4ba1339b713ac859a2d9fab308b714dd Mon Sep 17 00:00:00 2001 From: Zdenek Pytela Date: Jan 19 2022 14:45:24 +0000 Subject: Force a rebuild of policy unconditionally Currently, the policy is rebuilt only when /etc/selinux/POLICY/.rebuild exists which can make problems with independent policy modules. --- diff --git a/selinux-policy.spec b/selinux-policy.spec index ffbe954..fdedaff 100644 --- a/selinux-policy.spec +++ b/selinux-policy.spec @@ -320,8 +320,8 @@ if [ -s %{_sysconfdir}/selinux/config ]; then \ fi; \ if [ -e %{_sysconfdir}/selinux/%2/.rebuild ]; then \ rm %{_sysconfdir}/selinux/%2/.rebuild; \ - %{_sbindir}/semodule -B -n -s %2; \ fi; \ +%{_sbindir}/semodule -B -n -s %2; \ [ "${SELINUXTYPE}" == "%2" ] && %{_sbindir}/selinuxenabled && load_policy; \ if [ %1 -eq 1 ]; then \ %{_sbindir}/restorecon -R /root /var/log /run /etc/passwd* /etc/group* /etc/*shadow* 2> /dev/null; \