2014-09-03 19:52:03 +00:00
|
|
|
# Last Modified: Wed Sep 3 21:52:03 2014
|
2009-10-08 14:42:05 +00:00
|
|
|
|
|
|
|
#include <abstractions/base>
|
|
|
|
#include <abstractions/consoles>
|
|
|
|
#include <abstractions/nameservice>
|
|
|
|
|
|
|
|
# required for reading disk images
|
|
|
|
capability dac_override,
|
|
|
|
capability dac_read_search,
|
|
|
|
capability chown,
|
|
|
|
|
2014-01-26 21:47:35 +00:00
|
|
|
# needed to drop privileges
|
|
|
|
capability setgid,
|
|
|
|
capability setuid,
|
|
|
|
|
2009-10-08 14:42:05 +00:00
|
|
|
network inet stream,
|
|
|
|
network inet6 stream,
|
|
|
|
|
|
|
|
/dev/net/tun rw,
|
|
|
|
/dev/kvm rw,
|
|
|
|
/dev/ptmx rw,
|
|
|
|
/dev/kqemu rw,
|
2010-04-06 20:56:07 +00:00
|
|
|
@{PROC}/*/status r,
|
2014-09-03 19:52:03 +00:00
|
|
|
@{PROC}/sys/kernel/cap_last_cap r,
|
2009-10-08 14:42:05 +00:00
|
|
|
|
2010-04-06 20:56:07 +00:00
|
|
|
# For hostdev access. The actual devices will be added dynamically
|
|
|
|
/sys/bus/usb/devices/ r,
|
2014-01-26 21:47:35 +00:00
|
|
|
/sys/devices/**/usb[0-9]*/** r,
|
2009-10-08 14:42:05 +00:00
|
|
|
|
2009-11-13 14:19:05 +00:00
|
|
|
# WARNING: this gives the guest direct access to host hardware and specific
|
|
|
|
# portions of shared memory. This is required for sound using ALSA with kvm,
|
|
|
|
# but may constitute a security risk. If your environment does not require
|
|
|
|
# the use of sound in your VMs, feel free to comment out or prepend 'deny' to
|
|
|
|
# the rules for files in /dev.
|
2011-07-14 17:06:20 +00:00
|
|
|
/{dev,run}/shm r,
|
|
|
|
/{dev,run}/shmpulse-shm* r,
|
|
|
|
/{dev,run}/shmpulse-shm* rwk,
|
2009-11-13 14:19:05 +00:00
|
|
|
/dev/snd/* rw,
|
|
|
|
capability ipc_lock,
|
2014-01-26 21:47:35 +00:00
|
|
|
# spice
|
|
|
|
owner /{dev,run}/shm/spice.* rw,
|
2009-11-13 14:19:05 +00:00
|
|
|
# 'kill' is not required for sound and is a security risk. Do not enable
|
|
|
|
# unless you absolutely need it.
|
|
|
|
deny capability kill,
|
|
|
|
|
2010-04-06 20:56:07 +00:00
|
|
|
# Uncomment the following if you need access to /dev/fb*
|
|
|
|
#/dev/fb* rw,
|
|
|
|
|
2009-11-13 14:19:05 +00:00
|
|
|
/etc/pulse/client.conf r,
|
|
|
|
@{HOME}/.pulse-cookie rwk,
|
|
|
|
owner /root/.pulse-cookie rwk,
|
|
|
|
owner /root/.pulse/ rw,
|
|
|
|
owner /root/.pulse/* rw,
|
|
|
|
/usr/share/alsa/** r,
|
|
|
|
owner /tmp/pulse-*/ rw,
|
|
|
|
owner /tmp/pulse-*/* rw,
|
|
|
|
/var/lib/dbus/machine-id r,
|
|
|
|
|
|
|
|
# access to firmware's etc
|
2009-10-08 14:42:05 +00:00
|
|
|
/usr/share/kvm/** r,
|
|
|
|
/usr/share/qemu/** r,
|
2015-03-11 10:09:40 +00:00
|
|
|
/usr/share/qemu-kvm/** r,
|
2009-10-08 14:42:05 +00:00
|
|
|
/usr/share/bochs/** r,
|
|
|
|
/usr/share/openbios/** r,
|
|
|
|
/usr/share/openhackware/** r,
|
|
|
|
/usr/share/proll/** r,
|
|
|
|
/usr/share/vgabios/** r,
|
2010-04-06 20:56:07 +00:00
|
|
|
/usr/share/seabios/** r,
|
2014-01-26 21:47:35 +00:00
|
|
|
/usr/share/ovmf/** r,
|
2010-04-06 20:56:07 +00:00
|
|
|
|
|
|
|
# access PKI infrastructure
|
|
|
|
/etc/pki/libvirt-vnc/** r,
|
2009-10-08 14:42:05 +00:00
|
|
|
|
|
|
|
# the various binaries
|
|
|
|
/usr/bin/kvm rmix,
|
|
|
|
/usr/bin/qemu rmix,
|
2015-03-11 10:09:40 +00:00
|
|
|
/usr/bin/qemu-kvm rmix,
|
2015-11-24 15:04:18 +00:00
|
|
|
/usr/bin/qemu-system-aarch64 rmix,
|
|
|
|
/usr/bin/qemu-system-alpha rmix,
|
2009-10-08 14:42:05 +00:00
|
|
|
/usr/bin/qemu-system-arm rmix,
|
|
|
|
/usr/bin/qemu-system-cris rmix,
|
|
|
|
/usr/bin/qemu-system-i386 rmix,
|
2015-11-24 15:04:18 +00:00
|
|
|
/usr/bin/qemu-system-lm32 rmix,
|
2009-10-08 14:42:05 +00:00
|
|
|
/usr/bin/qemu-system-m68k rmix,
|
2011-07-07 02:45:05 +00:00
|
|
|
/usr/bin/qemu-system-microblaze rmix,
|
|
|
|
/usr/bin/qemu-system-microblazeel rmix,
|
2009-10-08 14:42:05 +00:00
|
|
|
/usr/bin/qemu-system-mips rmix,
|
|
|
|
/usr/bin/qemu-system-mips64 rmix,
|
|
|
|
/usr/bin/qemu-system-mips64el rmix,
|
|
|
|
/usr/bin/qemu-system-mipsel rmix,
|
2015-11-24 15:04:18 +00:00
|
|
|
/usr/bin/qemu-system-moxie rmix,
|
|
|
|
/usr/bin/qemu-system-or32 rmix,
|
2009-10-08 14:42:05 +00:00
|
|
|
/usr/bin/qemu-system-ppc rmix,
|
|
|
|
/usr/bin/qemu-system-ppc64 rmix,
|
|
|
|
/usr/bin/qemu-system-ppcemb rmix,
|
2015-11-24 15:04:18 +00:00
|
|
|
/usr/bin/qemu-system-s390x rmix,
|
2009-10-08 14:42:05 +00:00
|
|
|
/usr/bin/qemu-system-sh4 rmix,
|
|
|
|
/usr/bin/qemu-system-sh4eb rmix,
|
|
|
|
/usr/bin/qemu-system-sparc rmix,
|
|
|
|
/usr/bin/qemu-system-sparc64 rmix,
|
2015-11-24 15:04:18 +00:00
|
|
|
/usr/bin/qemu-system-tricore rmix,
|
|
|
|
/usr/bin/qemu-system-unicore32 rmix,
|
2009-10-08 14:42:05 +00:00
|
|
|
/usr/bin/qemu-system-x86_64 rmix,
|
2015-11-24 15:04:18 +00:00
|
|
|
/usr/bin/qemu-system-xtensa rmix,
|
|
|
|
/usr/bin/qemu-system-xtensaeb rmix,
|
|
|
|
/usr/bin/qemu-aarch64 rmix,
|
2009-10-08 14:42:05 +00:00
|
|
|
/usr/bin/qemu-alpha rmix,
|
|
|
|
/usr/bin/qemu-arm rmix,
|
|
|
|
/usr/bin/qemu-armeb rmix,
|
|
|
|
/usr/bin/qemu-cris rmix,
|
|
|
|
/usr/bin/qemu-i386 rmix,
|
|
|
|
/usr/bin/qemu-m68k rmix,
|
2011-07-07 02:45:05 +00:00
|
|
|
/usr/bin/qemu-microblaze rmix,
|
|
|
|
/usr/bin/qemu-microblazeel rmix,
|
2009-10-08 14:42:05 +00:00
|
|
|
/usr/bin/qemu-mips rmix,
|
2015-11-24 15:04:18 +00:00
|
|
|
/usr/bin/qemu-mips64 rmix,
|
|
|
|
/usr/bin/qemu-mips64el rmix,
|
2009-10-08 14:42:05 +00:00
|
|
|
/usr/bin/qemu-mipsel rmix,
|
2015-11-24 15:04:18 +00:00
|
|
|
/usr/bin/qemu-mipsn32 rmix,
|
|
|
|
/usr/bin/qemu-mipsn32el rmix,
|
|
|
|
/usr/bin/qemu-nbd rmix,
|
|
|
|
/usr/bin/qemu-or32 rmix,
|
2009-10-08 14:42:05 +00:00
|
|
|
/usr/bin/qemu-ppc rmix,
|
|
|
|
/usr/bin/qemu-ppc64 rmix,
|
|
|
|
/usr/bin/qemu-ppc64abi32 rmix,
|
2015-11-24 15:04:18 +00:00
|
|
|
/usr/bin/qemu-ppc64le rmix,
|
|
|
|
/usr/bin/qemu-s390x rmix,
|
2009-10-08 14:42:05 +00:00
|
|
|
/usr/bin/qemu-sh4 rmix,
|
|
|
|
/usr/bin/qemu-sh4eb rmix,
|
|
|
|
/usr/bin/qemu-sparc rmix,
|
|
|
|
/usr/bin/qemu-sparc32plus rmix,
|
|
|
|
/usr/bin/qemu-sparc64 rmix,
|
2015-11-24 15:04:18 +00:00
|
|
|
/usr/bin/qemu-unicore32 rmix,
|
2009-10-08 14:42:05 +00:00
|
|
|
/usr/bin/qemu-x86_64 rmix,
|
2014-12-15 14:14:48 +00:00
|
|
|
/usr/{lib,lib64}/qemu/block-curl.so mr,
|
2015-04-23 07:34:19 +00:00
|
|
|
/usr/{lib,lib64}/qemu/block-rbd.so mr,
|
2009-11-13 14:19:05 +00:00
|
|
|
|
|
|
|
# for save and resume
|
2016-12-03 18:32:48 +00:00
|
|
|
/{usr/,}bin/dash rmix,
|
|
|
|
/{usr/,}bin/dd rmix,
|
|
|
|
/{usr/,}bin/cat rmix,
|
2012-08-03 20:33:07 +00:00
|
|
|
|
2015-03-11 10:09:40 +00:00
|
|
|
# for restore
|
2016-12-03 18:32:48 +00:00
|
|
|
/{usr/,}bin/bash rmix,
|
2015-03-11 10:09:40 +00:00
|
|
|
|
2014-01-26 21:47:35 +00:00
|
|
|
# for usb access
|
|
|
|
/dev/bus/usb/ r,
|
|
|
|
/etc/udev/udev.conf r,
|
|
|
|
/sys/bus/ r,
|
|
|
|
/sys/class/ r,
|