Chris PeBenito 29af4c
policy_module(virt, 1.4.0)
Chris PeBenito eb4216
Chris PeBenito eb4216
########################################
Chris PeBenito eb4216
#
Chris PeBenito eb4216
# Declarations
Chris PeBenito eb4216
#
Chris PeBenito eb4216
Chris PeBenito eb4216
## <desc>
Chris PeBenito eb4216
## 

Chris PeBenito 3079cb
## Allow virt to use serial/parallell communication ports
Chris PeBenito 3079cb
## 

Chris PeBenito 3079cb
## </desc>
Chris PeBenito 3079cb
gen_tunable(virt_use_comm, false)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
## <desc>
Chris PeBenito 3079cb
## 

Chris PeBenito 763020
## Allow virt to read fuse files
Chris PeBenito 763020
## 

Chris PeBenito 763020
## </desc>
Chris PeBenito 763020
gen_tunable(virt_use_fusefs, false)
Chris PeBenito 763020
Chris PeBenito 763020
## <desc>
Chris PeBenito 763020
## 

Chris PeBenito eb4216
## Allow virt to manage nfs files
Chris PeBenito eb4216
## 

Chris PeBenito eb4216
## </desc>
Chris PeBenito eb4216
gen_tunable(virt_use_nfs, false)
Chris PeBenito eb4216
Chris PeBenito eb4216
## <desc>
Chris PeBenito eb4216
## 

Chris PeBenito eb4216
## Allow virt to manage cifs files
Chris PeBenito eb4216
## 

Chris PeBenito eb4216
## </desc>
Chris PeBenito eb4216
gen_tunable(virt_use_samba, false)
Chris PeBenito eb4216
Chris PeBenito 3079cb
## <desc>
Chris PeBenito 3079cb
## 

Chris PeBenito 3079cb
## Allow virt to manage device configuration, (pci)
Chris PeBenito 3079cb
## 

Chris PeBenito 3079cb
## </desc>
Chris PeBenito 3079cb
gen_tunable(virt_use_sysfs, false)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
## <desc>
Chris PeBenito 3079cb
## 

Chris PeBenito 3079cb
## Allow virt to use usb devices
Chris PeBenito 3079cb
## 

Chris PeBenito 3079cb
## </desc>
Chris PeBenito 3079cb
gen_tunable(virt_use_usb, true)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
virt_domain_template(svirt)
Chris PeBenito 3079cb
role system_r types svirt_t;
Chris PeBenito 3079cb
Chris PeBenito 3079cb
type svirt_cache_t;
Chris PeBenito 3079cb
files_type(svirt_cache_t)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
attribute virt_domain;
Chris PeBenito fb4826
attribute virt_image_type;
Chris PeBenito fb4826
Chris PeBenito eb4216
type virt_etc_t;
Chris PeBenito eb4216
files_config_file(virt_etc_t)
Chris PeBenito eb4216
Chris PeBenito eb4216
type virt_etc_rw_t;
Chris PeBenito eb4216
files_type(virt_etc_rw_t)
Chris PeBenito eb4216
Chris PeBenito eb4216
# virt Image files
Chris PeBenito 3079cb
type virt_image_t; # customizable
Chris PeBenito fb4826
virt_image(virt_image_t)
Chris PeBenito eb4216
Chris PeBenito 3079cb
# virt Image files
Chris PeBenito 3079cb
type virt_content_t; # customizable
Chris PeBenito 3079cb
virt_image(virt_content_t)
Chris PeBenito 3079cb
userdom_user_home_content(virt_content_t)
Chris PeBenito 3079cb
Chris PeBenito eb4216
type virt_log_t;
Chris PeBenito eb4216
logging_log_file(virt_log_t)
Chris PeBenito eb4216
Chris PeBenito eb4216
type virt_var_run_t;
Chris PeBenito eb4216
files_pid_file(virt_var_run_t)
Chris PeBenito eb4216
Chris PeBenito eb4216
type virt_var_lib_t;
Chris PeBenito eb4216
files_type(virt_var_lib_t)
Chris PeBenito eb4216
Chris PeBenito eb4216
type virtd_t;
Chris PeBenito eb4216
type virtd_exec_t;
Chris PeBenito eb4216
init_daemon_domain(virtd_t, virtd_exec_t)
Chris PeBenito 3079cb
domain_obj_id_change_exemption(virtd_t)
Chris PeBenito 3079cb
domain_subj_id_change_exemption(virtd_t)
Chris PeBenito eb4216
Chris PeBenito fb4826
type virtd_initrc_exec_t;
Chris PeBenito fb4826
init_script_file(virtd_initrc_exec_t)
Chris PeBenito fb4826
Chris PeBenito 3079cb
ifdef(`enable_mcs',`
Chris PeBenito 763020
	init_ranged_daemon_domain(virtd_t, virtd_exec_t, s0 - mcs_systemhigh)
Chris PeBenito 3079cb
')
Chris PeBenito 3079cb
Chris PeBenito 3079cb
ifdef(`enable_mls',`
Chris PeBenito 763020
	init_ranged_daemon_domain(virtd_t, virtd_exec_t, s0 - mls_systemhigh)
Chris PeBenito 3079cb
')
Chris PeBenito 3079cb
Chris PeBenito 3079cb
########################################
Chris PeBenito 3079cb
#
Chris PeBenito 3079cb
# svirt local policy
Chris PeBenito 3079cb
#
Chris PeBenito 3079cb
Chris PeBenito 3079cb
allow svirt_t self:udp_socket create_socket_perms;
Chris PeBenito 3079cb
Chris PeBenito 3079cb
manage_dirs_pattern(svirt_t, svirt_cache_t, svirt_cache_t)
Chris PeBenito 3079cb
manage_files_pattern(svirt_t, svirt_cache_t, svirt_cache_t)
Chris PeBenito 3079cb
files_var_filetrans(svirt_t, svirt_cache_t, { file dir })
Chris PeBenito 3079cb
Chris PeBenito 3079cb
read_lnk_files_pattern(svirt_t, virt_image_t, virt_image_t)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
allow svirt_t svirt_image_t:dir search_dir_perms;
Chris PeBenito 3079cb
manage_dirs_pattern(svirt_t, svirt_image_t, svirt_image_t)
Chris PeBenito 3079cb
manage_files_pattern(svirt_t, svirt_image_t, svirt_image_t)
Chris PeBenito 763020
fs_hugetlbfs_filetrans(svirt_t, svirt_image_t, file)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
list_dirs_pattern(svirt_t, virt_content_t, virt_content_t)
Chris PeBenito 3079cb
read_files_pattern(svirt_t, virt_content_t, virt_content_t)
Chris PeBenito 3079cb
dontaudit svirt_t virt_content_t:file write_file_perms;
Chris PeBenito 3079cb
dontaudit svirt_t virt_content_t:dir write;
Chris PeBenito 3079cb
Chris PeBenito 3079cb
corenet_udp_sendrecv_generic_if(svirt_t)
Chris PeBenito 3079cb
corenet_udp_sendrecv_generic_node(svirt_t)
Chris PeBenito 3079cb
corenet_udp_sendrecv_all_ports(svirt_t)
Chris PeBenito 3079cb
corenet_udp_bind_generic_node(svirt_t)
Chris PeBenito 3079cb
corenet_udp_bind_all_ports(svirt_t)
Chris PeBenito 763020
corenet_tcp_bind_all_ports(svirt_t)
Chris PeBenito 763020
corenet_tcp_connect_all_ports(svirt_t)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
dev_list_sysfs(svirt_t)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
userdom_search_user_home_content(svirt_t)
Chris PeBenito 763020
userdom_read_user_home_content_symlinks(svirt_t)
Chris PeBenito 3079cb
userdom_read_all_users_state(svirt_t)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
tunable_policy(`virt_use_comm',`
Chris PeBenito 3079cb
	term_use_unallocated_ttys(svirt_t)
Chris PeBenito 3079cb
	dev_rw_printer(svirt_t)
Chris PeBenito 3079cb
')
Chris PeBenito 3079cb
Chris PeBenito 763020
tunable_policy(`virt_use_fusefs',`
Chris PeBenito 763020
	fs_read_fusefs_files(svirt_t)
Chris PeBenito 763020
	fs_read_fusefs_symlinks(svirt_t)
Chris PeBenito 763020
')
Chris PeBenito 763020
Chris PeBenito 3079cb
tunable_policy(`virt_use_nfs',`
Chris PeBenito 3079cb
	fs_manage_nfs_dirs(svirt_t)
Chris PeBenito 3079cb
	fs_manage_nfs_files(svirt_t)
Chris PeBenito 3079cb
')
Chris PeBenito 3079cb
Chris PeBenito 3079cb
tunable_policy(`virt_use_samba',`
Chris PeBenito 3079cb
	fs_manage_cifs_dirs(svirt_t)
Chris PeBenito 3079cb
	fs_manage_cifs_files(svirt_t)
Chris PeBenito 3079cb
')
Chris PeBenito 3079cb
Chris PeBenito 3079cb
tunable_policy(`virt_use_sysfs',`
Chris PeBenito 3079cb
	dev_rw_sysfs(svirt_t)
Chris PeBenito 3079cb
')
Chris PeBenito 3079cb
Chris PeBenito 3079cb
tunable_policy(`virt_use_usb',`
Chris PeBenito 3079cb
	dev_rw_usbfs(svirt_t)
Chris PeBenito 3079cb
	fs_manage_dos_dirs(svirt_t)
Chris PeBenito 3079cb
	fs_manage_dos_files(svirt_t)
Chris PeBenito 3079cb
')
Chris PeBenito 3079cb
Chris PeBenito 3079cb
optional_policy(`
Chris PeBenito 3079cb
	xen_rw_image_files(svirt_t)
Chris PeBenito 3079cb
')
Chris PeBenito 3079cb
Chris PeBenito eb4216
########################################
Chris PeBenito eb4216
#
Chris PeBenito eb4216
# virtd local policy
Chris PeBenito eb4216
#
Chris PeBenito eb4216
Chris PeBenito 3079cb
allow virtd_t self:capability { chown dac_override fowner ipc_lock kill mknod net_admin net_raw setpcap setuid setgid sys_admin sys_nice sys_ptrace };
Chris PeBenito 3079cb
allow virtd_t self:process { getcap getsched setcap sigkill signal signull execmem setexec setfscreate setsched };
Chris PeBenito 3079cb
Chris PeBenito 3079cb
allow virtd_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito eb4216
allow virtd_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito eb4216
allow virtd_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 3079cb
allow virtd_t self:tun_socket create_socket_perms;
Chris PeBenito 763020
allow virtd_t self:netlink_kobject_uevent_socket create_socket_perms;
Chris PeBenito 3079cb
Chris PeBenito 3079cb
manage_dirs_pattern(virtd_t, svirt_cache_t, svirt_cache_t)
Chris PeBenito 3079cb
manage_files_pattern(virtd_t, svirt_cache_t, svirt_cache_t)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
manage_dirs_pattern(virtd_t, virt_content_t, virt_content_t)
Chris PeBenito 3079cb
manage_files_pattern(virtd_t, virt_content_t, virt_content_t)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
allow virtd_t virt_domain:process { getattr getsched setsched transition signal signull sigkill };
Chris PeBenito eb4216
Chris PeBenito eb4216
read_files_pattern(virtd_t, virt_etc_t, virt_etc_t)
Chris PeBenito eb4216
read_lnk_files_pattern(virtd_t, virt_etc_t, virt_etc_t)
Chris PeBenito eb4216
Chris PeBenito eb4216
manage_dirs_pattern(virtd_t, virt_etc_rw_t, virt_etc_rw_t)
Chris PeBenito eb4216
manage_files_pattern(virtd_t, virt_etc_rw_t, virt_etc_rw_t)
Chris PeBenito eb4216
manage_lnk_files_pattern(virtd_t, virt_etc_rw_t, virt_etc_rw_t)
Chris PeBenito eb4216
filetrans_pattern(virtd_t, virt_etc_t, virt_etc_rw_t, dir)
Chris PeBenito eb4216
Chris PeBenito fb4826
manage_files_pattern(virtd_t, virt_image_type, virt_image_type)
Chris PeBenito 3079cb
manage_blk_files_pattern(virtd_t, virt_image_type, virt_image_type)
Chris PeBenito 3079cb
allow virtd_t virt_image_type:file { relabelfrom relabelto };
Chris PeBenito 3079cb
allow virtd_t virt_image_type:blk_file { relabelfrom relabelto };
Chris PeBenito eb4216
Chris PeBenito eb4216
manage_dirs_pattern(virtd_t, virt_log_t, virt_log_t)
Chris PeBenito eb4216
manage_files_pattern(virtd_t, virt_log_t, virt_log_t)
Chris PeBenito eb4216
logging_log_filetrans(virtd_t, virt_log_t, { file dir })
Chris PeBenito eb4216
Chris PeBenito eb4216
manage_dirs_pattern(virtd_t, virt_var_lib_t, virt_var_lib_t)
Chris PeBenito eb4216
manage_files_pattern(virtd_t, virt_var_lib_t, virt_var_lib_t)
Chris PeBenito 3079cb
manage_sock_files_pattern(virtd_t, virt_var_lib_t, virt_var_lib_t)
Chris PeBenito eb4216
files_var_lib_filetrans(virtd_t, virt_var_lib_t, { file dir })
Chris PeBenito eb4216
Chris PeBenito eb4216
manage_dirs_pattern(virtd_t, virt_var_run_t, virt_var_run_t)
Chris PeBenito eb4216
manage_files_pattern(virtd_t, virt_var_run_t, virt_var_run_t)
Chris PeBenito eb4216
manage_sock_files_pattern(virtd_t, virt_var_run_t, virt_var_run_t)
Chris PeBenito eb4216
files_pid_filetrans(virtd_t, virt_var_run_t, { file dir })
Chris PeBenito eb4216
Chris PeBenito eb4216
kernel_read_system_state(virtd_t)
Chris PeBenito eb4216
kernel_read_network_state(virtd_t)
Chris PeBenito eb4216
kernel_rw_net_sysctls(virtd_t)
Chris PeBenito 3079cb
kernel_request_load_module(virtd_t)
Chris PeBenito 3079cb
kernel_search_debugfs(virtd_t)
Chris PeBenito eb4216
Chris PeBenito eb4216
corecmd_exec_bin(virtd_t)
Chris PeBenito eb4216
corecmd_exec_shell(virtd_t)
Chris PeBenito eb4216
Chris PeBenito eb4216
corenet_all_recvfrom_unlabeled(virtd_t)
Chris PeBenito eb4216
corenet_all_recvfrom_netlabel(virtd_t)
Chris PeBenito 668b30
corenet_tcp_sendrecv_generic_if(virtd_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(virtd_t)
Chris PeBenito eb4216
corenet_tcp_sendrecv_all_ports(virtd_t)
Chris PeBenito c12621
corenet_tcp_bind_generic_node(virtd_t)
Chris PeBenito 3079cb
corenet_tcp_bind_virt_port(virtd_t)
Chris PeBenito eb4216
corenet_tcp_bind_vnc_port(virtd_t)
Chris PeBenito eb4216
corenet_tcp_connect_vnc_port(virtd_t)
Chris PeBenito eb4216
corenet_tcp_connect_soundd_port(virtd_t)
Chris PeBenito eb4216
corenet_rw_tun_tap_dev(virtd_t)
Chris PeBenito eb4216
Chris PeBenito 3079cb
dev_rw_sysfs(virtd_t)
Chris PeBenito eb4216
dev_read_rand(virtd_t)
Chris PeBenito 3079cb
dev_rw_kvm(virtd_t)
Chris PeBenito 3079cb
dev_getattr_all_chr_files(virtd_t)
Chris PeBenito 763020
dev_rw_mtrr(virtd_t)
Chris PeBenito eb4216
Chris PeBenito eb4216
# Init script handling
Chris PeBenito eb4216
domain_use_interactive_fds(virtd_t)
Chris PeBenito 3079cb
domain_read_all_domains_state(virtd_t)
Chris PeBenito eb4216
Chris PeBenito eb4216
files_read_usr_files(virtd_t)
Chris PeBenito eb4216
files_read_etc_files(virtd_t)
Chris PeBenito eb4216
files_read_etc_runtime_files(virtd_t)
Chris PeBenito eb4216
files_search_all(virtd_t)
Chris PeBenito 3079cb
files_read_kernel_modules(virtd_t)
Chris PeBenito 3079cb
files_read_usr_src_files(virtd_t)
Chris PeBenito 3079cb
files_manage_etc_files(virtd_t)
Chris PeBenito eb4216
Chris PeBenito eb4216
fs_list_auto_mountpoints(virtd_t)
Chris PeBenito 3079cb
fs_getattr_xattr_fs(virtd_t)
Chris PeBenito 3079cb
fs_rw_anon_inodefs_files(virtd_t)
Chris PeBenito 3079cb
fs_list_inotifyfs(virtd_t)
Chris PeBenito 763020
fs_manage_cgroup_dirs(virtd_t)
Chris PeBenito 763020
fs_rw_cgroup_files(virtd_t)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
mcs_process_set_categories(virtd_t)
Chris PeBenito eb4216
Chris PeBenito 3079cb
storage_manage_fixed_disk(virtd_t)
Chris PeBenito 3079cb
storage_relabel_fixed_disk(virtd_t)
Chris PeBenito eb4216
storage_raw_write_removable_device(virtd_t)
Chris PeBenito eb4216
storage_raw_read_removable_device(virtd_t)
Chris PeBenito eb4216
Chris PeBenito eb4216
term_getattr_pty_fs(virtd_t)
Chris PeBenito 3079cb
term_use_generic_ptys(virtd_t)
Chris PeBenito eb4216
term_use_ptmx(virtd_t)
Chris PeBenito eb4216
Chris PeBenito eb4216
auth_use_nsswitch(virtd_t)
Chris PeBenito eb4216
Chris PeBenito eb4216
miscfiles_read_localization(virtd_t)
Dominick Grift 834062
miscfiles_read_generic_certs(virtd_t)
Chris PeBenito 763020
miscfiles_read_hwdata(virtd_t)
Chris PeBenito eb4216
Chris PeBenito 3079cb
modutils_read_module_deps(virtd_t)
Chris PeBenito 763020
modutils_read_module_config(virtd_t)
Chris PeBenito 3079cb
modutils_manage_module_config(virtd_t)
Chris PeBenito 3079cb
Chris PeBenito eb4216
logging_send_syslog_msg(virtd_t)
Chris PeBenito eb4216
Chris PeBenito 3079cb
seutil_read_default_contexts(virtd_t)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
sysnet_domtrans_ifconfig(virtd_t)
Chris PeBenito 3079cb
sysnet_read_config(virtd_t)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
userdom_getattr_all_users(virtd_t)
Chris PeBenito 3079cb
userdom_list_user_home_content(virtd_t)
Chris PeBenito eb4216
userdom_read_all_users_state(virtd_t)
Chris PeBenito 3079cb
userdom_read_user_home_content_files(virtd_t)
Chris PeBenito eb4216
Chris PeBenito eb4216
tunable_policy(`virt_use_nfs',`
Chris PeBenito eb4216
	fs_manage_nfs_dirs(virtd_t)
Chris PeBenito eb4216
	fs_manage_nfs_files(virtd_t)
Chris PeBenito eb4216
	fs_read_nfs_symlinks(virtd_t)
Chris PeBenito eb4216
')
Chris PeBenito eb4216
Chris PeBenito eb4216
tunable_policy(`virt_use_samba',`
Chris PeBenito eb4216
	fs_manage_nfs_files(virtd_t)
Chris PeBenito eb4216
	fs_manage_cifs_files(virtd_t)
Chris PeBenito eb4216
	fs_read_cifs_symlinks(virtd_t)
Chris PeBenito eb4216
')
Chris PeBenito eb4216
Chris PeBenito eb4216
optional_policy(`
Chris PeBenito eb4216
	brctl_domtrans(virtd_t)
Chris PeBenito eb4216
')
Chris PeBenito eb4216
Chris PeBenito eb4216
optional_policy(`
Chris PeBenito 296273
	dbus_system_bus_client(virtd_t)
Chris PeBenito eb4216
Chris PeBenito eb4216
	optional_policy(`
Chris PeBenito eb4216
		avahi_dbus_chat(virtd_t)
Chris PeBenito eb4216
	')
Chris PeBenito eb4216
Chris PeBenito eb4216
	optional_policy(`
Chris PeBenito eb4216
		consolekit_dbus_chat(virtd_t)
Chris PeBenito eb4216
	')
Chris PeBenito eb4216
Chris PeBenito eb4216
	optional_policy(`
Chris PeBenito eb4216
		hal_dbus_chat(virtd_t)
Chris PeBenito eb4216
	')
Chris PeBenito eb4216
')
Chris PeBenito eb4216
Chris PeBenito fb4826
optional_policy(`
Chris PeBenito fb4826
	dnsmasq_domtrans(virtd_t)
Chris PeBenito fb4826
	dnsmasq_signal(virtd_t)
Chris PeBenito fb4826
	dnsmasq_kill(virtd_t)
Chris PeBenito 3079cb
	dnsmasq_read_pid_files(virtd_t)
Chris PeBenito 3079cb
	dnsmasq_signull(virtd_t)
Chris PeBenito fb4826
')
Chris PeBenito eb4216
Chris PeBenito eb4216
optional_policy(`
Chris PeBenito eb4216
	iptables_domtrans(virtd_t)
Chris PeBenito 3079cb
	iptables_initrc_domtrans(virtd_t)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
	# Manages /etc/sysconfig/system-config-firewall
Chris PeBenito 3079cb
	iptables_manage_config(virtd_t)
Chris PeBenito eb4216
')
Chris PeBenito eb4216
Chris PeBenito 3079cb
optional_policy(`
Chris PeBenito 3079cb
	kerberos_keytab_template(virtd, virtd_t)
Chris PeBenito 3079cb
')
Chris PeBenito 3079cb
Chris PeBenito 3079cb
optional_policy(`
Chris PeBenito 3079cb
	lvm_domtrans(virtd_t)
Chris PeBenito 3079cb
')
Chris PeBenito 3079cb
Chris PeBenito 3079cb
optional_policy(`
Chris PeBenito 763020
	policykit_dbus_chat(virtd_t)
Chris PeBenito 3079cb
	policykit_domtrans_auth(virtd_t)
Chris PeBenito 3079cb
	policykit_domtrans_resolve(virtd_t)
Chris PeBenito 3079cb
	policykit_read_lib(virtd_t)
Chris PeBenito 3079cb
')
Chris PeBenito eb4216
Chris PeBenito eb4216
optional_policy(`
Chris PeBenito eb4216
	qemu_domtrans(virtd_t)
Chris PeBenito eb4216
	qemu_read_state(virtd_t)
Chris PeBenito eb4216
	qemu_signal(virtd_t)
Chris PeBenito eb4216
	qemu_kill(virtd_t)
Chris PeBenito 763020
	qemu_setsched(virtd_t)
Chris PeBenito eb4216
')
Chris PeBenito eb4216
Chris PeBenito eb4216
optional_policy(`
Chris PeBenito eb4216
	sasl_connect(virtd_t)
Chris PeBenito eb4216
')
Chris PeBenito eb4216
Chris PeBenito eb4216
optional_policy(`
Chris PeBenito eb4216
	kernel_read_xen_state(virtd_t)
Chris PeBenito eb4216
	kernel_write_xen_state(virtd_t)
Chris PeBenito eb4216
Chris PeBenito eb4216
	xen_stream_connect(virtd_t)
Chris PeBenito eb4216
	xen_stream_connect_xenstore(virtd_t)
Chris PeBenito 3079cb
	xen_read_image_files(virtd_t)
Chris PeBenito 3079cb
')
Chris PeBenito 3079cb
Chris PeBenito 3079cb
optional_policy(`
Chris PeBenito 3079cb
	udev_domtrans(virtd_t)
Chris PeBenito 763020
	udev_read_db(virtd_t)
Chris PeBenito eb4216
')
Chris PeBenito fb4826
Chris PeBenito fb4826
optional_policy(`
Chris PeBenito fb4826
	unconfined_domain(virtd_t)
Chris PeBenito fb4826
')
Chris PeBenito 3079cb
Chris PeBenito 3079cb
########################################
Chris PeBenito 3079cb
#
Chris PeBenito 3079cb
# virtual domains common policy
Chris PeBenito 3079cb
#
Chris PeBenito 3079cb
Chris PeBenito 763020
allow virt_domain self:capability { dac_read_search dac_override kill };
Chris PeBenito 763020
allow virt_domain self:process { execmem execstack signal getsched signull };
Chris PeBenito 3079cb
allow virt_domain self:fifo_file rw_file_perms;
Chris PeBenito 3079cb
allow virt_domain self:shm create_shm_perms;
Chris PeBenito 3079cb
allow virt_domain self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 3079cb
allow virt_domain self:unix_dgram_socket { create_socket_perms sendto };
Chris PeBenito 3079cb
allow virt_domain self:tcp_socket create_stream_socket_perms;
Chris PeBenito 3079cb
Chris PeBenito 3079cb
append_files_pattern(virt_domain, virt_log_t, virt_log_t)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
append_files_pattern(virt_domain, virt_var_lib_t, virt_var_lib_t)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
kernel_read_system_state(virt_domain)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
corecmd_exec_bin(virt_domain)
Chris PeBenito 3079cb
corecmd_exec_shell(virt_domain)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
corenet_all_recvfrom_unlabeled(virt_domain)
Chris PeBenito 3079cb
corenet_all_recvfrom_netlabel(virt_domain)
Chris PeBenito 3079cb
corenet_tcp_sendrecv_generic_if(virt_domain)
Chris PeBenito 3079cb
corenet_tcp_sendrecv_generic_node(virt_domain)
Chris PeBenito 3079cb
corenet_tcp_sendrecv_all_ports(virt_domain)
Chris PeBenito 3079cb
corenet_tcp_bind_generic_node(virt_domain)
Chris PeBenito 3079cb
corenet_tcp_bind_vnc_port(virt_domain)
Chris PeBenito 3079cb
corenet_rw_tun_tap_dev(virt_domain)
Chris PeBenito 3079cb
corenet_tcp_bind_virt_migration_port(virt_domain)
Chris PeBenito 3079cb
corenet_tcp_connect_virt_migration_port(virt_domain)
Chris PeBenito 3079cb
Chris PeBenito 763020
dev_read_rand(virt_domain)
Chris PeBenito 3079cb
dev_read_sound(virt_domain)
Chris PeBenito 763020
dev_read_urand(virt_domain)
Chris PeBenito 3079cb
dev_write_sound(virt_domain)
Chris PeBenito 3079cb
dev_rw_ksm(virt_domain)
Chris PeBenito 3079cb
dev_rw_kvm(virt_domain)
Chris PeBenito 3079cb
dev_rw_qemu(virt_domain)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
domain_use_interactive_fds(virt_domain)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
files_read_etc_files(virt_domain)
Chris PeBenito 3079cb
files_read_usr_files(virt_domain)
Chris PeBenito 3079cb
files_read_var_files(virt_domain)
Chris PeBenito 763020
files_search_all(virt_domain)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
fs_getattr_tmpfs(virt_domain)
Chris PeBenito 3079cb
fs_rw_anon_inodefs_files(virt_domain)
Chris PeBenito 3079cb
fs_rw_tmpfs_files(virt_domain)
Chris PeBenito 3079cb
Chris PeBenito 763020
term_use_all_terms(virt_domain)
Chris PeBenito 763020
term_getattr_pty_fs(virt_domain)
Chris PeBenito 763020
term_use_generic_ptys(virt_domain)
Chris PeBenito 763020
term_use_ptmx(virt_domain)
Chris PeBenito 763020
Chris PeBenito 3079cb
auth_use_nsswitch(virt_domain)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
logging_send_syslog_msg(virt_domain)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
miscfiles_read_localization(virt_domain)
Chris PeBenito 3079cb
Chris PeBenito 3079cb
optional_policy(`
Chris PeBenito 3079cb
	ptchown_domtrans(virt_domain)
Chris PeBenito 3079cb
')
Chris PeBenito 3079cb
Chris PeBenito 3079cb
optional_policy(`
Chris PeBenito 3079cb
	virt_read_config(virt_domain)
Chris PeBenito 3079cb
	virt_read_lib_files(virt_domain)
Chris PeBenito 3079cb
	virt_read_content(virt_domain)
Chris PeBenito 3079cb
	virt_stream_connect(virt_domain)
Chris PeBenito 3079cb
')