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-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,
|
|
|
|
|
|
|
|
/**.img r,
|
|
|
|
/**.qcow{,2} r,
|
|
|
|
/**.qed r,
|
|
|
|
/**.vmdk r,
|
|
|
|
/**.[iI][sS][oO] r,
|
|
|
|
/**/disk{,.*} r,
|
2009-10-08 14:42:05 +00:00
|
|
|
}
|