]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
security: Add support for SUSE edk2 firmware paths
authorJim Fehlig <jfehlig@suse.com>
Thu, 23 Feb 2023 18:02:46 +0000 (11:02 -0700)
committerJim Fehlig <jfehlig@suse.com>
Thu, 2 Mar 2023 22:01:13 +0000 (15:01 -0700)
SUSE installs edk2 firmwares for both x86_64 and aarch64 in /usr/share/qemu.
Add support for this path in virt-aa-helper and allow locking files within
the path in the libvirt qemu abstraction.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
src/security/apparmor/libvirt-qemu
src/security/virt-aa-helper.c

index d0289b8943d01f8f776f6c1a4635ce980d83402a..9af1333b22ab2491237a28c9424ec4399e31970d 100644 (file)
@@ -91,7 +91,7 @@
   /usr/share/proll/** r,
   /usr/share/qemu-efi/** r,
   /usr/share/qemu-kvm/** r,
-  /usr/share/qemu/** r,
+  /usr/share/qemu/** rk,
   /usr/share/seabios/** r,
   /usr/share/sgabios/** r,
   /usr/share/slof/** r,
index f6c9703db6931e82b82666b43646a0a803c35b60..d65d459850f7bbfb017a4d2fb47f243ba9552318 100644 (file)
@@ -481,6 +481,7 @@ valid_path(const char *path, const bool readonly)
         "/usr/share/AAVMF/",                 /* for AAVMF images */
         "/usr/share/qemu-efi/",              /* for AAVMF images */
         "/usr/share/qemu-efi-aarch64/",      /* for AAVMF images */
+        "/usr/share/qemu/",                  /* SUSE path for OVMF and AAVMF images */
         "/usr/lib/u-boot/",                  /* u-boot loaders for qemu */
         "/usr/lib/riscv64-linux-gnu/opensbi" /* RISC-V SBI implementation */
     };