]> xenbits.xensource.com Git - libvirt.git/commitdiff
apparmor: Only support passt on 3.x
authorAndrea Bolognani <abologna@redhat.com>
Thu, 29 Jun 2023 09:47:13 +0000 (11:47 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 3 Jul 2023 12:55:37 +0000 (14:55 +0200)
The subprofile can only work by including the abstraction shipped
in the passt package, which we can't assume is present, and
'include if exists' doesn't work well on 2.x.

No distro that's stuck on AppArmor 2.x is likely to be shipping
passt anyway.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
src/security/apparmor/libvirt-qemu.in

index 44056b5f141c79db6c56e57138f8af056f7bee0a..1548cf23bfc4196707e00c9e4e706e915dce7a21 100644 (file)
   /usr/{lib,lib64}/libswtpm_libtpms.so mr,
   /usr/lib/@{multiarch}/libswtpm_libtpms.so mr,
 
+@BEGIN_APPARMOR_3@
   # support for passt network back-end
   /usr/bin/passt Cx -> passt,
 
 
     include if exists <abstractions/passt>
   }
+@END_APPARMOR_3@
 
   # for save and resume
   /{usr/,}bin/dash rmix,