apparmor: Make all profiles extensible

Do for all other profiles what we already do for the
virt-aa-helper one. In this case we limit the feature to AppArmor
3.x, as it was never implemented for 2.x.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
This commit is contained in:
Andrea Bolognani 2023-06-29 12:04:02 +02:00
parent 21a84ec994
commit 4c6feb832f
3 changed files with 12 additions and 0 deletions

View File

@ -139,4 +139,8 @@ profile libvirtd @sbindir@/libvirtd flags=(attach_disconnected) {
/usr/{lib,lib64,lib/qemu,libexec}/qemu-bridge-helper rmix,
}
@BEGIN_APPARMOR_3@
include if exists <local/usr.sbin.libvirtd>
@END_APPARMOR_3@
}

View File

@ -132,4 +132,8 @@ profile virtqemud @sbindir@/virtqemud flags=(attach_disconnected) {
/usr/{lib,lib64,lib/qemu,libexec}/qemu-bridge-helper rmix,
}
@BEGIN_APPARMOR_3@
include if exists <local/usr.sbin.virtqemud>
@END_APPARMOR_3@
}

View File

@ -52,4 +52,8 @@ profile virtxend @sbindir@/virtxend flags=(attach_disconnected) {
@libexecdir@/libvirt_iohelper ix,
/etc/libvirt/hooks/** rmix,
/etc/xen/scripts/** rmix,
@BEGIN_APPARMOR_3@
include if exists <local/usr.sbin.virtxend>
@END_APPARMOR_3@
}