From: Alessandro Astone Date: Sat, 31 Dec 2022 11:57:42 +0000 (+0100) Subject: lxc: Fixup apparmor detection X-Git-Tag: 1.4.0~63 X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/commitdiff_plain/fc08b71b971ad6a4a9d6575d3a3b2271f26a8ed1?ds=sidebyside lxc: Fixup apparmor detection `aa-status --quiet` is not a valid flag, but it still returned 0 --- diff --git a/tools/helpers/lxc.py b/tools/helpers/lxc.py index 19a7ceb..50c3c16 100644 --- a/tools/helpers/lxc.py +++ b/tools/helpers/lxc.py @@ -132,8 +132,8 @@ def generate_nodes_lxc_config(args): LXC_APPARMOR_PROFILE = "lxc-waydroid" def get_apparmor_status(args): enabled = False - if shutil.which("aa-status"): - enabled = (tools.helpers.run.user(args, ["aa-status", "--quiet"], check=False) == 0) + if shutil.which("aa-enabled"): + enabled = (tools.helpers.run.user(args, ["aa-enabled", "--quiet"], check=False) == 0) if not enabled and shutil.which("systemctl"): enabled = (tools.helpers.run.user(args, ["systemctl", "is-active", "-q", "apparmor"], check=False) == 0) try: