]> glassweightruler.freedombox.rocks Git - waydroid.git/commitdiff
lxc: Fixup apparmor detection
authorAlessandro Astone <ales.astone@gmail.com>
Sat, 31 Dec 2022 11:57:42 +0000 (12:57 +0100)
committerAlessandro Astone <ales.astone@gmail.com>
Sat, 31 Dec 2022 11:57:47 +0000 (12:57 +0100)
`aa-status --quiet` is not a valid flag, but it still returned 0

tools/helpers/lxc.py

index 19a7ceb9b7760907ce3d4488509c2e6d8cbfee63..50c3c168e67f63e85aff616d61e4f1d0f5daba25 100644 (file)
@@ -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: