apparmor-rpm-macros/macros.apparmor
Goldwyn Rodrigues 726ad7f1de Accepting request 580869 from home:tbechtold:branches:security:apparmor
- Check if apparmor is active before reloading a profile (bsc#1083226)
  Otherwise a package using the %apparmor_reload macro in %post
  automatically enables the profile even if apparmor itself is
  not active.

OBS-URL: https://build.opensuse.org/request/show/580869
OBS-URL: https://build.opensuse.org/package/show/security:apparmor/apparmor-rpm-macros?expand=0&rev=7
2018-02-28 14:30:47 +00:00

8 lines
210 B
Plaintext

%apparmor_reload()\
if [ "$YAST_IS_RUNNING" != "instsys" ]; then\
if /usr/bin/systemctl is-active --quiet apparmor.service; then\
/sbin/apparmor_parser -r -T -W %{?*} &> /dev/null || :\
fi\
fi\
%{nil}