2020-06-10 19:02:27 +00:00
|
|
|
policy_module(vhostmd, 1.5.1)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type vhostmd_t;
|
|
|
|
type vhostmd_exec_t;
|
|
|
|
init_daemon_domain(vhostmd_t, vhostmd_exec_t)
|
|
|
|
|
|
|
|
type vhostmd_initrc_exec_t;
|
|
|
|
init_script_file(vhostmd_initrc_exec_t)
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
type vhostmd_runtime_t alias vhostmd_var_run_t;
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_file(vhostmd_runtime_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
2019-09-11 00:05:46 +00:00
|
|
|
type vhostmd_tmpfs_t;
|
|
|
|
files_tmpfs_file(vhostmd_tmpfs_t)
|
|
|
|
|
2018-06-23 13:00:56 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow vhostmd_t self:capability { dac_override ipc_lock setgid setuid };
|
|
|
|
allow vhostmd_t self:process { setsched getsched signal };
|
|
|
|
allow vhostmd_t self:fifo_file rw_fifo_file_perms;
|
|
|
|
|
|
|
|
manage_dirs_pattern(vhostmd_t, vhostmd_tmpfs_t, vhostmd_tmpfs_t)
|
|
|
|
manage_files_pattern(vhostmd_t, vhostmd_tmpfs_t, vhostmd_tmpfs_t)
|
|
|
|
fs_tmpfs_filetrans(vhostmd_t, vhostmd_tmpfs_t, { file dir })
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
manage_dirs_pattern(vhostmd_t, vhostmd_runtime_t, vhostmd_runtime_t)
|
|
|
|
manage_files_pattern(vhostmd_t, vhostmd_runtime_t, vhostmd_runtime_t)
|
|
|
|
manage_sock_files_pattern(vhostmd_t, vhostmd_runtime_t, vhostmd_runtime_t)
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_filetrans(vhostmd_t, vhostmd_runtime_t, { file dir sock_file })
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
kernel_read_kernel_sysctls(vhostmd_t)
|
|
|
|
kernel_read_system_state(vhostmd_t)
|
|
|
|
kernel_read_network_state(vhostmd_t)
|
|
|
|
kernel_write_xen_state(vhostmd_t)
|
|
|
|
|
|
|
|
corecmd_exec_bin(vhostmd_t)
|
|
|
|
corecmd_exec_shell(vhostmd_t)
|
|
|
|
|
|
|
|
corenet_all_recvfrom_netlabel(vhostmd_t)
|
|
|
|
corenet_tcp_sendrecv_generic_if(vhostmd_t)
|
|
|
|
corenet_tcp_sendrecv_generic_node(vhostmd_t)
|
|
|
|
|
|
|
|
corenet_sendrecv_soundd_client_packets(vhostmd_t)
|
|
|
|
corenet_tcp_connect_soundd_port(vhostmd_t)
|
|
|
|
|
|
|
|
dev_read_rand(vhostmd_t)
|
|
|
|
dev_read_urand(vhostmd_t)
|
|
|
|
dev_read_sysfs(vhostmd_t)
|
|
|
|
|
|
|
|
files_list_tmp(vhostmd_t)
|
|
|
|
files_read_usr_files(vhostmd_t)
|
|
|
|
|
|
|
|
auth_use_nsswitch(vhostmd_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(vhostmd_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(vhostmd_t)
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
hostname_exec(vhostmd_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
rpm_exec(vhostmd_t)
|
|
|
|
rpm_read_db(vhostmd_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
virt_stream_connect(vhostmd_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
xen_domtrans_xm(vhostmd_t)
|
|
|
|
xen_stream_connect(vhostmd_t)
|
|
|
|
xen_stream_connect_xenstore(vhostmd_t)
|
|
|
|
xen_stream_connect_xm(vhostmd_t)
|
|
|
|
')
|