|
Chris PeBenito |
17de1b |
## <summary>Asterisk IP telephony server</summary>
|
|
Chris PeBenito |
5843d0 |
|
|
Chris PeBenito |
ada61e |
######################################
|
|
Chris PeBenito |
ada61e |
## <summary>
|
|
Chris PeBenito |
ada61e |
## Execute asterisk in the asterisk domain.
|
|
Chris PeBenito |
ada61e |
## </summary>
|
|
Chris PeBenito |
ada61e |
## <param name="domain">
|
|
Chris PeBenito |
ada61e |
## <summary>
|
|
Dominick Grift |
288845 |
## Domain allowed to transition.
|
|
Chris PeBenito |
ada61e |
## </summary>
|
|
Chris PeBenito |
ada61e |
## </param>
|
|
Chris PeBenito |
ada61e |
#
|
|
Chris PeBenito |
ada61e |
interface(`asterisk_domtrans',`
|
|
Chris PeBenito |
ada61e |
gen_require(`
|
|
Chris PeBenito |
ada61e |
type asterisk_t, asterisk_exec_t;
|
|
Chris PeBenito |
ada61e |
')
|
|
Chris PeBenito |
ada61e |
|
|
Chris PeBenito |
ada61e |
corecmd_search_bin($1)
|
|
Chris PeBenito |
ada61e |
domtrans_pattern($1, asterisk_exec_t, asterisk_t)
|
|
Chris PeBenito |
ada61e |
')
|
|
Chris PeBenito |
ada61e |
|
|
Chris PeBenito |
32f27a |
#####################################
|
|
Chris PeBenito |
32f27a |
## <summary>
|
|
Chris PeBenito |
32f27a |
## Connect to asterisk over a unix domain
|
|
Chris PeBenito |
32f27a |
## stream socket.
|
|
Chris PeBenito |
32f27a |
## </summary>
|
|
Chris PeBenito |
32f27a |
## <param name="domain">
|
|
Chris PeBenito |
32f27a |
## <summary>
|
|
Chris PeBenito |
32f27a |
## Domain allowed access.
|
|
Chris PeBenito |
32f27a |
## </summary>
|
|
Chris PeBenito |
32f27a |
## </param>
|
|
Chris PeBenito |
32f27a |
#
|
|
Chris PeBenito |
32f27a |
interface(`asterisk_stream_connect',`
|
|
Chris PeBenito |
32f27a |
gen_require(`
|
|
Chris PeBenito |
32f27a |
type asterisk_t, asterisk_var_run_t;
|
|
Chris PeBenito |
32f27a |
')
|
|
Chris PeBenito |
32f27a |
|
|
Chris PeBenito |
32f27a |
files_search_pids($1)
|
|
Chris PeBenito |
32f27a |
stream_connect_pattern($1, asterisk_var_run_t, asterisk_var_run_t, asterisk_t)
|
|
Chris PeBenito |
32f27a |
')
|
|
Chris PeBenito |
32f27a |
|
|
Chris PeBenito |
5843d0 |
########################################
|
|
Chris PeBenito |
5843d0 |
## <summary>
|
|
Chris PeBenito |
32f27a |
## 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 |
|
|
Dominick Grift |
dcbbee |
allow $1 asterisk_t:process { ptrace signal_perms };
|
|
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 |
')
|