]> xenbits.xensource.com Git - libvirt.git/commitdiff
apparmor: QEMU bridge helper policy updates
authorRicha Marwaha <rmarwah@linux.vnet.ibm.com>
Fri, 3 Aug 2012 20:33:07 +0000 (16:33 -0400)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 6 Aug 2012 14:56:59 +0000 (16:56 +0200)
This patch provides AppArmor policy updates for the QEMU bridge helper.
The QEMU bridge helper is a SUID executable exec'd by QEMU that drops
capabilities to CAP_NET_ADMIN and adds a tap device to a network bridge.

Signed-off-by: Richa Marwaha <rmarwah@linux.vnet.ibm.com>
Signed-off-by: Corey Bryant<coreyb@linux.vnet.ibm.com>
examples/apparmor/libvirt-qemu

index 10cdd36b5ff45f025b67826c757774d079b0bc1f..766a334e2750190f791191e5504b1c2cf90a17b3 100644 (file)
@@ -1,4 +1,4 @@
-# Last Modified: Mon Apr  5 15:11:27 2010
+# Last Modified: Fri Mar 9 14:43:22 2012
 
   #include <abstractions/base>
   #include <abstractions/consoles>
   /bin/dash rmix,
   /bin/dd rmix,
   /bin/cat rmix,
+
+  /usr/libexec/qemu-bridge-helper Cx,
+  # child profile for bridge helper process
+  profile /usr/libexec/qemu-bridge-helper {
+   #include <abstractions/base>
+
+   capability setuid,
+   capability setgid,
+   capability setpcap,
+   capability net_admin,
+
+   network inet stream,
+
+   /dev/net/tun rw,
+   /etc/qemu/** r,
+   owner @{PROC}/*/status r,
+
+   /usr/libexec/qemu-bridge-helper rmix,
+  }