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.

Resolves: rhbz#2082524
This commit is contained in:
Zdenek Pytela 2022-01-19 13:25:07 +01:00
parent 6ff7178e84
commit b5863057a5
1 changed files with 1 additions and 1 deletions

View File

@ -318,8 +318,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; \