]> xenbits.xensource.com Git - libvirt.git/commit
apparmor: Add user session path for PID and socket files used by passt
authorStefano Brivio <sbrivio@redhat.com>
Tue, 30 Jan 2024 18:15:51 +0000 (19:15 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Wed, 31 Jan 2024 10:25:32 +0000 (11:25 +0100)
commitf95675fdbb42eee07fc4864d7c135dcb8b00c3a9
treed058a5be4dc571a324f732457cc1641433f6ce8f
parent7284b4cf8b0d9f9f319a3fc69662ff3f809963c1
apparmor: Add user session path for PID and socket files used by passt

Commit 7a39b04d683f ("apparmor: Enable passt support") grants
passt(1) read-write access to /{,var/}run/libvirt/qemu/passt/* if
started by the libvirt daemon. That's the path where passt creates
PID and socket files only if the guest is started by the root user.

If the guest is started by another user, though, the path is more
commonly /var/run/user/$UID/libvirt/qemu/run/passt: add it as
read-write location. Otherwise, passt won't be able to start, as
reported by Andreas.

While at it, replace /{,var/}run/ in the existing rule by its
corresponding tunable variable, @{run}.

Fixes: 7a39b04d683f ("apparmor: Enable passt support")
Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1061678
Reported-by: Andreas B. Mundt <andi@debian.org>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
src/security/apparmor/libvirt-qemu.in