Dominique Leuenberger 2018-03-04 10:52:18 +00:00 committed by Git OBS Bridge
commit 8b7431b8a6
3 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Feb 28 06:37:37 UTC 2018 - tbechtold@suse.com
- 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.
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Aug 26 19:08:14 UTC 2017 - suse-beta@cboltz.de Sat Aug 26 19:08:14 UTC 2017 - suse-beta@cboltz.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package apparmor-rpm-macros # spec file for package apparmor-rpm-macros
# #
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -20,7 +20,7 @@ Name: apparmor-rpm-macros
Version: 1.0 Version: 1.0
Release: 0 Release: 0
Summary: RPM macros used to setup apparmor profiles Summary: RPM macros used to setup apparmor profiles
License: LGPL-2.1+ License: LGPL-2.1-or-later
Group: Development/Tools/Other Group: Development/Tools/Other
Url: https://bugs.launchpad.net/apparmor Url: https://bugs.launchpad.net/apparmor
Source: macros.apparmor Source: macros.apparmor

View File

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