]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
apparmor: Enable passt support
authorAndrea Bolognani <abologna@redhat.com>
Tue, 7 Mar 2023 18:20:09 +0000 (19:20 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 10 Mar 2023 14:32:39 +0000 (15:32 +0100)
passt provides an AppArmor abstraction that covers all the
inner details of its operation, so we can simply import that
and add the libvirt-specific parts on top: namely, passt
needs to be able to create a socket and pid file, while
the libvirt daemon needs to be able to kill passt.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/security/apparmor/libvirt-qemu

index 9af1333b22ab2491237a28c9424ec4399e31970d..44056b5f141c79db6c56e57138f8af056f7bee0a 100644 (file)
   /usr/{lib,lib64}/libswtpm_libtpms.so mr,
   /usr/lib/@{multiarch}/libswtpm_libtpms.so mr,
 
+  # support for passt network back-end
+  /usr/bin/passt Cx -> passt,
+
+  profile passt {
+    /usr/bin/passt r,
+
+    signal (receive) set=("term") peer=/usr/sbin/libvirtd,
+    signal (receive) set=("term") peer=libvirtd,
+    signal (receive) set=("term") peer=virtqemud,
+
+    owner /{,var/}run/libvirt/qemu/passt/* rw,
+
+    include if exists <abstractions/passt>
+  }
+
   # for save and resume
   /{usr/,}bin/dash rmix,
   /{usr/,}bin/dd rmix,