2010-04-06 20:56:07 +00:00
|
|
|
# Last Modified: Mon Apr 5 15:10:27 2010
|
2009-10-08 14:42:05 +00:00
|
|
|
#include <tunables/global>
|
|
|
|
|
2014-12-15 14:14:48 +00:00
|
|
|
profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
|
2009-10-08 14:42:05 +00:00
|
|
|
#include <abstractions/base>
|
|
|
|
|
|
|
|
# needed for searching directories
|
|
|
|
capability dac_override,
|
|
|
|
capability dac_read_search,
|
|
|
|
|
|
|
|
# needed for when disk is on a network filesystem
|
|
|
|
network inet,
|
2017-11-03 08:46:59 +00:00
|
|
|
network inet6,
|
2009-10-08 14:42:05 +00:00
|
|
|
|
|
|
|
deny @{PROC}/[0-9]*/mounts r,
|
2014-01-26 21:47:35 +00:00
|
|
|
@{PROC}/[0-9]*/net/psched r,
|
|
|
|
owner @{PROC}/[0-9]*/status r,
|
2009-10-08 14:42:05 +00:00
|
|
|
@{PROC}/filesystems r,
|
|
|
|
|
2017-05-18 08:53:42 +00:00
|
|
|
/etc/libnl-3/classid r,
|
|
|
|
|
2010-04-06 20:56:07 +00:00
|
|
|
# for hostdev
|
|
|
|
/sys/devices/ r,
|
|
|
|
/sys/devices/** r,
|
2017-12-20 10:56:43 +00:00
|
|
|
/sys/bus/usb/devices/ r,
|
2017-05-18 08:53:43 +00:00
|
|
|
deny /dev/sd* r,
|
|
|
|
deny /dev/vd* r,
|
|
|
|
deny /dev/dm-* r,
|
|
|
|
deny /dev/drbd[0-9]* r,
|
|
|
|
deny /dev/dasd* r,
|
|
|
|
deny /dev/nvme* r,
|
|
|
|
deny /dev/zd[0-9]* r,
|
|
|
|
deny /dev/mapper/ r,
|
|
|
|
deny /dev/mapper/* r,
|
2010-04-06 20:56:07 +00:00
|
|
|
|
2014-12-15 14:14:48 +00:00
|
|
|
/usr/{lib,lib64}/libvirt/virt-aa-helper mr,
|
2016-12-03 18:32:48 +00:00
|
|
|
/{usr/,}sbin/apparmor_parser Ux,
|
2009-10-08 14:42:05 +00:00
|
|
|
|
|
|
|
/etc/apparmor.d/libvirt/* r,
|
|
|
|
/etc/apparmor.d/libvirt/libvirt-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]* rw,
|
2010-04-06 20:56:07 +00:00
|
|
|
|
|
|
|
# for backingstore -- allow access to non-hidden files in @{HOME} as well
|
|
|
|
# as storage pools
|
|
|
|
audit deny @{HOME}/.* mrwkl,
|
|
|
|
audit deny @{HOME}/.*/ rw,
|
|
|
|
audit deny @{HOME}/.*/** mrwkl,
|
|
|
|
audit deny @{HOME}/bin/ rw,
|
|
|
|
audit deny @{HOME}/bin/** mrwkl,
|
|
|
|
@{HOME}/ r,
|
|
|
|
@{HOME}/** r,
|
|
|
|
/var/lib/libvirt/images/ r,
|
|
|
|
/var/lib/libvirt/images/** r,
|
2014-01-26 21:47:35 +00:00
|
|
|
/{media,mnt,opt,srv}/** r,
|
2017-12-11 10:09:31 +00:00
|
|
|
# For virt-sandbox
|
2018-01-02 08:54:46 +00:00
|
|
|
/{,var/}run/libvirt/**/[sv]d[a-z] r,
|
2014-01-26 21:47:35 +00:00
|
|
|
|
|
|
|
/**.img r,
|
2017-12-11 10:09:31 +00:00
|
|
|
/**.raw r,
|
2014-01-26 21:47:35 +00:00
|
|
|
/**.qcow{,2} r,
|
|
|
|
/**.qed r,
|
|
|
|
/**.vmdk r,
|
|
|
|
/**.[iI][sS][oO] r,
|
|
|
|
/**/disk{,.*} r,
|
2017-12-11 10:09:31 +00:00
|
|
|
|
|
|
|
#include <local/usr.lib.libvirt.virt-aa-helper>
|
2009-10-08 14:42:05 +00:00
|
|
|
}
|