|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
policy_module(asterisk,1.0.2)
|
|
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 |
17de1b |
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 |
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 |
17de1b |
allow asterisk_t self:capability { dac_override setgid setuid sys_nice };
|
|
Chris PeBenito |
17de1b |
dontaudit asterisk_t self:capability sys_tty_config;
|
|
Chris PeBenito |
17de1b |
allow asterisk_t self:process { setsched signal_perms };
|
|
Chris PeBenito |
17de1b |
allow asterisk_t self:fifo_file rw_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 |
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 |
17de1b |
allow asterisk_t asterisk_etc_t:file r_file_perms;
|
|
Chris PeBenito |
17de1b |
allow asterisk_t asterisk_etc_t:dir r_dir_perms;
|
|
Chris PeBenito |
17de1b |
allow asterisk_t asterisk_etc_t:lnk_file { getattr read };
|
|
Chris PeBenito |
17de1b |
files_search_etc(asterisk_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow asterisk_t asterisk_log_t:file manage_file_perms;
|
|
Chris PeBenito |
17de1b |
allow asterisk_t asterisk_log_t:dir rw_dir_perms;
|
|
Chris PeBenito |
17de1b |
logging_log_filetrans(asterisk_t,asterisk_log_t,{ file dir })
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow asterisk_t asterisk_spool_t:dir manage_dir_perms;
|
|
Chris PeBenito |
17de1b |
allow asterisk_t asterisk_spool_t:file manage_file_perms;
|
|
Chris PeBenito |
17de1b |
allow asterisk_t asterisk_spool_t:lnk_file create_lnk_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow asterisk_t asterisk_tmp_t:dir create_dir_perms;
|
|
Chris PeBenito |
17de1b |
allow asterisk_t asterisk_tmp_t:file create_file_perms;
|
|
Chris PeBenito |
17de1b |
files_tmp_filetrans(asterisk_t, asterisk_tmp_t, { file dir })
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow asterisk_t asterisk_tmpfs_t:dir rw_dir_perms;
|
|
Chris PeBenito |
17de1b |
allow asterisk_t asterisk_tmpfs_t:file manage_file_perms;
|
|
Chris PeBenito |
17de1b |
allow asterisk_t asterisk_tmpfs_t:lnk_file create_lnk_perms;
|
|
Chris PeBenito |
17de1b |
allow asterisk_t asterisk_tmpfs_t:sock_file manage_file_perms;
|
|
Chris PeBenito |
17de1b |
allow asterisk_t asterisk_tmpfs_t:fifo_file manage_file_perms;
|
|
Chris PeBenito |
17de1b |
fs_tmpfs_filetrans(asterisk_t,asterisk_tmpfs_t,{ dir file lnk_file sock_file fifo_file })
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow asterisk_t asterisk_var_lib_t:file manage_file_perms;
|
|
Chris PeBenito |
17de1b |
allow asterisk_t asterisk_var_lib_t:dir rw_dir_perms;
|
|
Chris PeBenito |
17de1b |
files_var_lib_filetrans(asterisk_t,asterisk_var_lib_t,file)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow asterisk_t asterisk_var_run_t:sock_file manage_file_perms;
|
|
Chris PeBenito |
17de1b |
allow asterisk_t asterisk_var_run_t:fifo_file manage_file_perms;
|
|
Chris PeBenito |
17de1b |
allow asterisk_t asterisk_var_run_t:file manage_file_perms;
|
|
Chris PeBenito |
17de1b |
allow asterisk_t asterisk_var_run_t:dir rw_dir_perms;
|
|
Chris PeBenito |
17de1b |
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 |
17de1b |
|
|
Chris PeBenito |
17de1b |
corecmd_exec_bin(asterisk_t)
|
|
Chris PeBenito |
17de1b |
corecmd_search_sbin(asterisk_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
corenet_non_ipsec_sendrecv(asterisk_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_generic_if(asterisk_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_generic_if(asterisk_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_all_nodes(asterisk_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_all_nodes(asterisk_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_all_ports(asterisk_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_all_ports(asterisk_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_bind_all_nodes(asterisk_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_bind_all_nodes(asterisk_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_bind_asterisk_port(asterisk_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_bind_asterisk_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 |
17de1b |
corenet_sendrecv_generic_server_packets(asterisk_t)
|
|
Chris PeBenito |
17de1b |
|
|
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 |
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 |
17de1b |
fs_search_auto_mountpoints(asterisk_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
term_dontaudit_use_console(asterisk_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
init_use_fds(asterisk_t)
|
|
Chris PeBenito |
17de1b |
init_use_script_ptys(asterisk_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
libs_use_ld_so(asterisk_t)
|
|
Chris PeBenito |
17de1b |
libs_use_shared_libs(asterisk_t)
|
|
Chris PeBenito |
17de1b |
|
|
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 |
sysnet_read_config(asterisk_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
userdom_dontaudit_use_unpriv_user_fds(asterisk_t)
|
|
Chris PeBenito |
17de1b |
userdom_dontaudit_search_sysadm_home_dirs(asterisk_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
17de1b |
term_dontaudit_use_unallocated_ttys(asterisk_t)
|
|
Chris PeBenito |
17de1b |
term_dontaudit_use_generic_ptys(asterisk_t)
|
|
Chris PeBenito |
17de1b |
files_dontaudit_read_root_files(asterisk_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
nis_use_ypbind(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 |
17de1b |
udev_read_db(asterisk_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
ifdef(`TODO',`
|
|
Chris PeBenito |
17de1b |
allow initrc_t asterisk_var_run_t:fifo_file unlink;
|
|
Chris PeBenito |
17de1b |
allow sysadm_t asterisk_t:unix_stream_socket { connectto rw_stream_socket_perms };
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|