Chris PeBenito 29af4c
policy_module(asterisk, 1.8.0)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type asterisk_t;
Chris PeBenito 17de1b
type asterisk_exec_t;
Chris PeBenito 0bfccd
init_daemon_domain(asterisk_t, asterisk_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type asterisk_etc_t;
Chris PeBenito 17de1b
files_config_file(asterisk_etc_t)
Chris PeBenito 17de1b
Chris PeBenito 5843d0
type asterisk_initrc_exec_t;
Chris PeBenito 5843d0
init_script_file(asterisk_initrc_exec_t)
Chris PeBenito 5843d0
Chris PeBenito 17de1b
type asterisk_log_t;
Chris PeBenito 17de1b
logging_log_file(asterisk_log_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type asterisk_spool_t;
Chris PeBenito 17de1b
files_type(asterisk_spool_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type asterisk_tmp_t;
Chris PeBenito 17de1b
files_tmp_file(asterisk_tmp_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type asterisk_tmpfs_t;
Chris PeBenito 17de1b
files_tmpfs_file(asterisk_tmpfs_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type asterisk_var_lib_t;
Chris PeBenito 17de1b
files_type(asterisk_var_lib_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type asterisk_var_run_t;
Chris PeBenito 17de1b
files_pid_file(asterisk_var_run_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# dac_override for /var/run/asterisk
Chris PeBenito ada61e
allow asterisk_t self:capability { dac_override setgid setuid sys_nice net_admin };
Chris PeBenito 17de1b
dontaudit asterisk_t self:capability sys_tty_config;
Chris PeBenito ada61e
allow asterisk_t self:process { getsched setsched signal_perms getcap setcap };
Chris PeBenito c0868a
allow asterisk_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito 17de1b
allow asterisk_t self:sem create_sem_perms;
Chris PeBenito 17de1b
allow asterisk_t self:shm create_shm_perms;
Chris PeBenito ada61e
allow asterisk_t self:unix_stream_socket connectto;
Chris PeBenito 17de1b
allow asterisk_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 17de1b
allow asterisk_t self:udp_socket create_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito c0868a
allow asterisk_t asterisk_etc_t:dir list_dir_perms;
Chris PeBenito 0bfccd
read_files_pattern(asterisk_t, asterisk_etc_t, asterisk_etc_t)
Chris PeBenito 0bfccd
read_lnk_files_pattern(asterisk_t, asterisk_etc_t, asterisk_etc_t)
Chris PeBenito 17de1b
files_search_etc(asterisk_t)
Chris PeBenito 17de1b
Chris PeBenito ada61e
can_exec(asterisk_t, asterisk_exec_t)
Chris PeBenito ada61e
Chris PeBenito 0bfccd
manage_files_pattern(asterisk_t, asterisk_log_t, asterisk_log_t)
Chris PeBenito 0bfccd
logging_log_filetrans(asterisk_t, asterisk_log_t, { file dir })
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_dirs_pattern(asterisk_t, asterisk_spool_t, asterisk_spool_t)
Chris PeBenito 0bfccd
manage_files_pattern(asterisk_t, asterisk_spool_t, asterisk_spool_t)
Chris PeBenito 0bfccd
manage_lnk_files_pattern(asterisk_t, asterisk_spool_t, asterisk_spool_t)
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_dirs_pattern(asterisk_t, asterisk_tmp_t, asterisk_tmp_t)
Chris PeBenito 0bfccd
manage_files_pattern(asterisk_t, asterisk_tmp_t, asterisk_tmp_t)
Chris PeBenito 17de1b
files_tmp_filetrans(asterisk_t, asterisk_tmp_t, { file dir })
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_files_pattern(asterisk_t, asterisk_tmpfs_t, asterisk_tmpfs_t)
Chris PeBenito 0bfccd
manage_lnk_files_pattern(asterisk_t, asterisk_tmpfs_t, asterisk_tmpfs_t)
Chris PeBenito 0bfccd
manage_fifo_files_pattern(asterisk_t, asterisk_tmpfs_t, asterisk_tmpfs_t)
Chris PeBenito 0bfccd
manage_sock_files_pattern(asterisk_t, asterisk_tmpfs_t, asterisk_tmpfs_t)
Chris PeBenito 0bfccd
fs_tmpfs_filetrans(asterisk_t, asterisk_tmpfs_t, { dir file lnk_file sock_file fifo_file })
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_files_pattern(asterisk_t, asterisk_var_lib_t, asterisk_var_lib_t)
Chris PeBenito 0bfccd
files_var_lib_filetrans(asterisk_t, asterisk_var_lib_t, file)
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_files_pattern(asterisk_t, asterisk_var_run_t, asterisk_var_run_t)
Chris PeBenito 0bfccd
manage_fifo_files_pattern(asterisk_t, asterisk_var_run_t, asterisk_var_run_t)
Chris PeBenito 0bfccd
manage_sock_files_pattern(asterisk_t, asterisk_var_run_t, asterisk_var_run_t)
Chris PeBenito 0bfccd
files_pid_filetrans(asterisk_t, asterisk_var_run_t, file)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_system_state(asterisk_t)
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(asterisk_t)
Chris PeBenito ada61e
kernel_request_load_module(asterisk_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
corecmd_exec_bin(asterisk_t)
Chris PeBenito ada61e
corecmd_exec_shell(asterisk_t)
Chris PeBenito 17de1b
Chris PeBenito 190066
corenet_all_recvfrom_unlabeled(asterisk_t)
Chris PeBenito 190066
corenet_all_recvfrom_netlabel(asterisk_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_generic_if(asterisk_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_generic_if(asterisk_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(asterisk_t)
Chris PeBenito c12621
corenet_udp_sendrecv_generic_node(asterisk_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_ports(asterisk_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_ports(asterisk_t)
Chris PeBenito c12621
corenet_tcp_bind_generic_node(asterisk_t)
Chris PeBenito c12621
corenet_udp_bind_generic_node(asterisk_t)
Chris PeBenito 17de1b
corenet_tcp_bind_asterisk_port(asterisk_t)
Dan Walsh 3eaa99
corenet_tcp_bind_sip_port(asterisk_t)
Chris PeBenito 17de1b
corenet_udp_bind_asterisk_port(asterisk_t)
Chris PeBenito 32f27a
corenet_udp_bind_sip_port(asterisk_t)
Chris PeBenito 17de1b
corenet_sendrecv_asterisk_server_packets(asterisk_t)
Chris PeBenito 17de1b
# for VOIP voice channels.
Chris PeBenito 17de1b
corenet_tcp_bind_generic_port(asterisk_t)
Chris PeBenito 17de1b
corenet_udp_bind_generic_port(asterisk_t)
Chris PeBenito 6c9118
corenet_dontaudit_udp_bind_all_ports(asterisk_t)
Chris PeBenito 17de1b
corenet_sendrecv_generic_server_packets(asterisk_t)
Chris PeBenito ada61e
corenet_tcp_connect_postgresql_port(asterisk_t)
Chris PeBenito ada61e
corenet_tcp_connect_snmp_port(asterisk_t)
Dan Walsh 3eaa99
corenet_tcp_connect_sip_port(asterisk_t)
Chris PeBenito 17de1b
Chris PeBenito ada61e
dev_rw_generic_usb_dev(asterisk_t)
Chris PeBenito 17de1b
dev_read_sysfs(asterisk_t)
Chris PeBenito 17de1b
dev_read_sound(asterisk_t)
Chris PeBenito 17de1b
dev_write_sound(asterisk_t)
Chris PeBenito ada61e
dev_read_urand(asterisk_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(asterisk_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(asterisk_t)
Chris PeBenito 17de1b
files_search_spool(asterisk_t)
Chris PeBenito 17de1b
# demo files installed in /usr/share/asterisk/sounds/demo-instruct.gsm
Chris PeBenito 17de1b
# are labeled usr_t
Chris PeBenito 17de1b
files_read_usr_files(asterisk_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_getattr_all_fs(asterisk_t)
Chris PeBenito ada61e
fs_list_inotifyfs(asterisk_t)
Chris PeBenito ada61e
fs_read_anon_inodefs_files(asterisk_t)
Chris PeBenito 17de1b
fs_search_auto_mountpoints(asterisk_t)
Chris PeBenito 17de1b
Chris PeBenito ada61e
auth_use_nsswitch(asterisk_t)
Chris PeBenito ada61e
Chris PeBenito 17de1b
logging_send_syslog_msg(asterisk_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(asterisk_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_dontaudit_use_unpriv_user_fds(asterisk_t)
Chris PeBenito 296273
userdom_dontaudit_search_user_home_dirs(asterisk_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito ada61e
	mysql_stream_connect(asterisk_t)
Chris PeBenito ada61e
')
Chris PeBenito ada61e
Chris PeBenito ada61e
optional_policy(`
Chris PeBenito ada61e
	mta_send_mail(asterisk_t)
Chris PeBenito ada61e
')
Chris PeBenito ada61e
Chris PeBenito ada61e
optional_policy(`
Dan Walsh 3eaa99
	postfix_domtrans_postdrop(asterisk_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Chris PeBenito ada61e
	postgresql_stream_connect(asterisk_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	seutil_sigchld_newrole(asterisk_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito ada61e
	snmp_read_snmp_var_lib_files(asterisk_t)
Chris PeBenito ada61e
	snmp_stream_connect(asterisk_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito ada61e
optional_policy(`
Chris PeBenito ada61e
	udev_read_db(asterisk_t)
Chris PeBenito 17de1b
')