Chris PeBenito 17de1b
## <summary>Asterisk IP telephony server</summary>
Chris PeBenito 5843d0
Chris PeBenito 5843d0
########################################
Chris PeBenito 5843d0
## <summary>
Chris PeBenito 5843d0
##	All of the rules required to administrate 
Chris PeBenito 5843d0
##	an asterisk environment
Chris PeBenito 5843d0
## </summary>
Chris PeBenito 5843d0
## <param name="domain">
Chris PeBenito 5843d0
##	<summary>
Chris PeBenito 5843d0
##	Domain allowed access.
Chris PeBenito 5843d0
##	</summary>
Chris PeBenito 5843d0
## </param>
Chris PeBenito 5843d0
## <param name="role">
Chris PeBenito 5843d0
##	<summary>
Chris PeBenito 5843d0
##	The role to be allowed to manage the asterisk domain.
Chris PeBenito 5843d0
##	</summary>
Chris PeBenito 5843d0
## </param>
Chris PeBenito 5843d0
## <rolecap/>
Chris PeBenito 5843d0
#
Chris PeBenito 5843d0
interface(`asterisk_admin',`
Chris PeBenito 5843d0
	gen_require(`
Chris PeBenito 5843d0
		type asterisk_t, asterisk_var_run_t, asterisk_spool_t;
Chris PeBenito 5843d0
		type asterisk_etc_t, asterisk_tmp_t, asterisk_log_t;
Chris PeBenito 5843d0
		type asterisk_var_lib_t;
Chris PeBenito 5843d0
		type asterisk_initrc_exec_t;
Chris PeBenito 5843d0
	')
Chris PeBenito 5843d0
Chris PeBenito 5843d0
	allow $1 asterisk_t:process { ptrace signal_perms getattr };
Chris PeBenito 5843d0
	ps_process_pattern($1, asterisk_t)
Chris PeBenito 5843d0
Chris PeBenito 5843d0
	init_labeled_script_domtrans($1, asterisk_initrc_exec_t)
Chris PeBenito 5843d0
	domain_system_change_exemption($1)
Chris PeBenito 5843d0
	role_transition $2 asterisk_initrc_exec_t system_r;
Chris PeBenito 5843d0
	allow $2 system_r;
Chris PeBenito 5843d0
Chris PeBenito 5843d0
	files_list_tmp($1)
Chris PeBenito 5843d0
	admin_pattern($1, asterisk_tmp_t)
Chris PeBenito 5843d0
Chris PeBenito 5843d0
	files_list_etc($1)
Chris PeBenito 5843d0
	admin_pattern($1, asterisk_etc_t)
Chris PeBenito 5843d0
Chris PeBenito 5843d0
	logging_list_logs($1)
Chris PeBenito 5843d0
	admin_pattern($1, asterisk_log_t)
Chris PeBenito 5843d0
Chris PeBenito 5843d0
	files_list_spool($1)
Chris PeBenito 5843d0
	admin_pattern($1, asterisk_spool_t)
Chris PeBenito 5843d0
Chris PeBenito 5843d0
	files_list_var_lib($1)
Chris PeBenito 5843d0
	admin_pattern($1, asterisk_var_lib_t)
Chris PeBenito 5843d0
Chris PeBenito 5843d0
	files_list_pids($1)
Chris PeBenito 5843d0
	admin_pattern($1, asterisk_var_run_t)
Chris PeBenito 5843d0
')