]> xenbits.xensource.com Git - libvirt.git/commitdiff
apparmor: add rules to use qemu_bridge_helper
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Mon, 9 Apr 2018 06:24:19 +0000 (08:24 +0200)
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>
Thu, 12 Apr 2018 09:09:29 +0000 (11:09 +0200)
Due to mediation of socket and signal activity currently qemu:///session
connections calling qemu_bridge_helper fail.

We need the profile for libvirtd itself and the subprofile for
qemu-bridge-helper to be able to talk/notify to each other via unix socket and
signals.

Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1754871
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Acked-by: Michal Privoznik <mprivozn@redhat.com>
examples/apparmor/usr.sbin.libvirtd

index be4fabf90596dfd65e21a77c3b93994ff743719d..3102cab382670302982e671e33a92faefb14821c 100644 (file)
   signal (read, send) peer=libvirt-*,
   signal (send) set=("kill", "term") peer=unconfined,
 
+  # For communication/control to qemu-bridge-helper
+  unix (send, receive) type=stream addr=none peer=(label=/usr/sbin/libvirtd//qemu_bridge_helper),
+  signal (send) set=("term") peer=/usr/sbin/libvirtd//qemu_bridge_helper,
+
   # Very lenient profile for libvirtd since we want to first focus on confining
   # the guests. Guests will have a very restricted profile.
   / r,
 
    network inet stream,
 
+   # For communication/control from libvirtd
+   unix (send, receive) type=stream addr=none peer=(label=/usr/sbin/libvirtd),
+   signal (receive) set=("term") peer=/usr/sbin/libvirtd,
+
    /dev/net/tun rw,
    /etc/qemu/** r,
    owner @{PROC}/*/status r,