]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
apparmor: add attach_disconnected
authorGuido Günther <agx@sigxcpu.org>
Fri, 15 Sep 2017 15:13:16 +0000 (17:13 +0200)
committerGuido Günther <agx@sigxcpu.org>
Mon, 18 Sep 2017 17:06:52 +0000 (19:06 +0200)
Otherwise we fail to reconnect to /dev/net/tun opened by libvirtd
like

    [ 8144.507756] audit: type=1400 audit(1505488162.386:38069121): apparmor="DENIED" operation="file_perm" info="Failed name lookup - disconnected path" error=-13 profile="libvirt-5dfcc8a7-b79a-4fa9-a41f-f6271651934c" name="dev/net/tun" pid=9607 comm="qemu-system-x86" requested_mask="r" denied_mask="r" fsuid=117 ouid=0

Reviewed-By: Jamie Strandboge <jamie@canonical.com>
Acked-By: Michal Privoznik <mprivozn@redhat.com>
examples/apparmor/TEMPLATE.lxc
examples/apparmor/TEMPLATE.qemu

index 7b64885a1c09be59353d32cf7f8b54eb6276eb6d..f1005dc575c7f813df8fb68c3c3a3fcf711846a3 100644 (file)
@@ -4,7 +4,7 @@
 
 #include <tunables/global>
 
-profile LIBVIRT_TEMPLATE {
+profile LIBVIRT_TEMPLATE flags=(attach_disconnected) {
   #include <abstractions/libvirt-lxc>
 
   # Globally allows everything to run under this profile
index 008a2212447adae888fec7542782d1143f51f8ce..a327315d92803df0cc4f5189c870c7adde8a6e3e 100644 (file)
@@ -4,6 +4,6 @@
 
 #include <tunables/global>
 
-profile LIBVIRT_TEMPLATE {
+profile LIBVIRT_TEMPLATE flags=(attach_disconnected) {
   #include <abstractions/libvirt-qemu>
 }