File apparmor-securityfs-systemd.patch of Package apparmor_2_6

From: Federic Crozat <fcrozat@suse.com>
Subkect: apparmor: Let systemd automount securityfs
References: bnc#704460

 Do not mount securityfs when running under systemd, just access
 the directory, systemd will automount it

---
 parser/rc.apparmor.functions |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/parser/rc.apparmor.functions
+++ b/parser/rc.apparmor.functions
@@ -295,7 +295,7 @@ is_apparmor_loaded() {
 }
 
 is_securityfs_mounted() {
-	grep -q securityfs /proc/filesystems && grep -q securityfs /proc/mounts
+	test -d ${SECURITYFS} -a -d /sys/fs/cgroup/systemd || grep -q securityfs /proc/filesystems && grep -q securityfs /proc/mounts
 	return $?
 }
 
openSUSE Build Service is sponsored by