From 80ecee51db5c6f87b4827a8b4e9dcf3cc12e62e1 Mon Sep 17 00:00:00 2001 From: herypt <70331266+herypt@users.noreply.github.com> Date: Wed, 2 Sep 2020 15:07:30 +0200 Subject: [PATCH] Set apparmor feature when template advertises support for it --- qubes/ext/services.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qubes/ext/services.py b/qubes/ext/services.py index 080fc59c..13598e2f 100644 --- a/qubes/ext/services.py +++ b/qubes/ext/services.py @@ -174,7 +174,13 @@ class ServicesExtension(qubes.ext.Extension): for feature in new_supported_services.difference( old_supported_services): vm.features[feature] = True + if feature == 'supported-service.apparmor' and \ + not 'apparmor' in vm.features: + vm.features['apparmor'] = True for feature in old_supported_services.difference( new_supported_services): del vm.features[feature] + if feature == 'supported-service.apparmor' and \ + 'apparmor' in vm.features and vm.features['apparmor'] == '1': + del vm.features['apparmor']