|
Jeremy Solt |
584dfa |
## <summary> ShoutCast compatible streaming media server</summary>
|
|
Jeremy Solt |
584dfa |
|
|
Jeremy Solt |
584dfa |
########################################
|
|
Jeremy Solt |
584dfa |
## <summary>
|
|
Jeremy Solt |
584dfa |
## Execute a domain transition to run icecast.
|
|
Jeremy Solt |
584dfa |
## </summary>
|
|
Jeremy Solt |
584dfa |
## <param name="domain">
|
|
Dominick Grift |
1976dd |
## <summary>
|
|
Jeremy Solt |
584dfa |
## Domain allowed to transition.
|
|
Dominick Grift |
1976dd |
## </summary>
|
|
Jeremy Solt |
584dfa |
## </param>
|
|
Jeremy Solt |
584dfa |
#
|
|
Jeremy Solt |
584dfa |
interface(`icecast_domtrans',`
|
|
Jeremy Solt |
584dfa |
gen_require(`
|
|
Jeremy Solt |
584dfa |
type icecast_t, icecast_exec_t;
|
|
Jeremy Solt |
584dfa |
')
|
|
Jeremy Solt |
584dfa |
|
|
Jeremy Solt |
584dfa |
domtrans_pattern($1, icecast_exec_t, icecast_t)
|
|
Jeremy Solt |
584dfa |
')
|
|
Jeremy Solt |
584dfa |
|
|
Jeremy Solt |
584dfa |
########################################
|
|
Jeremy Solt |
584dfa |
## <summary>
|
|
Chris PeBenito |
340af1 |
## Allow domain signal icecast
|
|
Chris PeBenito |
340af1 |
## </summary>
|
|
Chris PeBenito |
340af1 |
## <param name="domain">
|
|
Chris PeBenito |
340af1 |
## <summary>
|
|
Chris PeBenito |
340af1 |
## Domain allowed access.
|
|
Chris PeBenito |
340af1 |
## </summary>
|
|
Chris PeBenito |
340af1 |
## </param>
|
|
Chris PeBenito |
340af1 |
#
|
|
Chris PeBenito |
340af1 |
interface(`icecast_signal',`
|
|
Chris PeBenito |
340af1 |
gen_require(`
|
|
Chris PeBenito |
340af1 |
type icecast_t;
|
|
Chris PeBenito |
340af1 |
')
|
|
Chris PeBenito |
340af1 |
|
|
Chris PeBenito |
340af1 |
allow $1 icecast_t:process signal;
|
|
Chris PeBenito |
340af1 |
')
|
|
Chris PeBenito |
340af1 |
|
|
Chris PeBenito |
340af1 |
########################################
|
|
Chris PeBenito |
340af1 |
## <summary>
|
|
Jeremy Solt |
584dfa |
## Execute icecast server in the icecast domain.
|
|
Jeremy Solt |
584dfa |
## </summary>
|
|
Jeremy Solt |
584dfa |
## <param name="domain">
|
|
Jeremy Solt |
584dfa |
## <summary>
|
|
Dominick Grift |
288845 |
## Domain allowed to transition.
|
|
Jeremy Solt |
584dfa |
## </summary>
|
|
Jeremy Solt |
584dfa |
## </param>
|
|
Jeremy Solt |
584dfa |
#
|
|
Jeremy Solt |
584dfa |
interface(`icecast_initrc_domtrans',`
|
|
Jeremy Solt |
584dfa |
gen_require(`
|
|
Jeremy Solt |
584dfa |
type icecast_initrc_exec_t;
|
|
Jeremy Solt |
584dfa |
')
|
|
Jeremy Solt |
584dfa |
|
|
Jeremy Solt |
584dfa |
init_labeled_script_domtrans($1, icecast_initrc_exec_t)
|
|
Jeremy Solt |
584dfa |
')
|
|
Jeremy Solt |
584dfa |
|
|
Jeremy Solt |
584dfa |
########################################
|
|
Jeremy Solt |
584dfa |
## <summary>
|
|
Jeremy Solt |
584dfa |
## Read icecast PID files.
|
|
Jeremy Solt |
584dfa |
## </summary>
|
|
Jeremy Solt |
584dfa |
## <param name="domain">
|
|
Jeremy Solt |
584dfa |
## <summary>
|
|
Jeremy Solt |
584dfa |
## Domain allowed access.
|
|
Jeremy Solt |
584dfa |
## </summary>
|
|
Jeremy Solt |
584dfa |
## </param>
|
|
Jeremy Solt |
584dfa |
#
|
|
Jeremy Solt |
584dfa |
interface(`icecast_read_pid_files',`
|
|
Jeremy Solt |
584dfa |
gen_require(`
|
|
Jeremy Solt |
584dfa |
type icecast_var_run_t;
|
|
Jeremy Solt |
584dfa |
')
|
|
Jeremy Solt |
584dfa |
|
|
Jeremy Solt |
584dfa |
files_search_pids($1)
|
|
Jeremy Solt |
584dfa |
allow $1 icecast_var_run_t:file read_file_perms;
|
|
Jeremy Solt |
584dfa |
')
|
|
Jeremy Solt |
584dfa |
|
|
Jeremy Solt |
584dfa |
########################################
|
|
Jeremy Solt |
584dfa |
## <summary>
|
|
Jeremy Solt |
584dfa |
## Manage icecast pid files.
|
|
Jeremy Solt |
584dfa |
## </summary>
|
|
Jeremy Solt |
584dfa |
## <param name="domain">
|
|
Jeremy Solt |
584dfa |
## <summary>
|
|
Jeremy Solt |
584dfa |
## Domain allowed access.
|
|
Jeremy Solt |
584dfa |
## </summary>
|
|
Jeremy Solt |
584dfa |
## </param>
|
|
Jeremy Solt |
584dfa |
#
|
|
Jeremy Solt |
584dfa |
interface(`icecast_manage_pid_files',`
|
|
Jeremy Solt |
584dfa |
gen_require(`
|
|
Jeremy Solt |
584dfa |
type icecast_var_run_t;
|
|
Jeremy Solt |
584dfa |
')
|
|
Jeremy Solt |
584dfa |
|
|
Jeremy Solt |
584dfa |
files_search_pids($1)
|
|
Jeremy Solt |
584dfa |
manage_files_pattern($1, icecast_var_run_t, icecast_var_run_t)
|
|
Jeremy Solt |
584dfa |
')
|
|
Jeremy Solt |
584dfa |
|
|
Jeremy Solt |
584dfa |
########################################
|
|
Jeremy Solt |
584dfa |
## <summary>
|
|
Jeremy Solt |
584dfa |
## Allow the specified domain to read icecast's log files.
|
|
Jeremy Solt |
584dfa |
## </summary>
|
|
Jeremy Solt |
584dfa |
## <param name="domain">
|
|
Jeremy Solt |
584dfa |
## <summary>
|
|
Jeremy Solt |
584dfa |
## Domain allowed access.
|
|
Jeremy Solt |
584dfa |
## </summary>
|
|
Jeremy Solt |
584dfa |
## </param>
|
|
Jeremy Solt |
584dfa |
## <rolecap/>
|
|
Jeremy Solt |
584dfa |
#
|
|
Jeremy Solt |
584dfa |
interface(`icecast_read_log',`
|
|
Jeremy Solt |
584dfa |
gen_require(`
|
|
Jeremy Solt |
584dfa |
type icecast_log_t;
|
|
Jeremy Solt |
584dfa |
')
|
|
Jeremy Solt |
584dfa |
|
|
Jeremy Solt |
584dfa |
logging_search_logs($1)
|
|
Jeremy Solt |
584dfa |
read_files_pattern($1, icecast_log_t, icecast_log_t)
|
|
Jeremy Solt |
584dfa |
')
|
|
Jeremy Solt |
584dfa |
|
|
Jeremy Solt |
584dfa |
########################################
|
|
Jeremy Solt |
584dfa |
## <summary>
|
|
Jeremy Solt |
584dfa |
## Allow the specified domain to append
|
|
Jeremy Solt |
584dfa |
## icecast log files.
|
|
Jeremy Solt |
584dfa |
## </summary>
|
|
Jeremy Solt |
584dfa |
## <param name="domain">
|
|
Dominick Grift |
1976dd |
## <summary>
|
|
Jeremy Solt |
584dfa |
## Domain allowed access.
|
|
Dominick Grift |
1976dd |
## </summary>
|
|
Jeremy Solt |
584dfa |
## </param>
|
|
Jeremy Solt |
584dfa |
#
|
|
Jeremy Solt |
584dfa |
interface(`icecast_append_log',`
|
|
Jeremy Solt |
584dfa |
gen_require(`
|
|
Jeremy Solt |
584dfa |
type icecast_log_t;
|
|
Jeremy Solt |
584dfa |
')
|
|
Jeremy Solt |
584dfa |
|
|
Jeremy Solt |
584dfa |
logging_search_logs($1)
|
|
Jeremy Solt |
584dfa |
append_files_pattern($1, icecast_log_t, icecast_log_t)
|
|
Jeremy Solt |
584dfa |
')
|
|
Jeremy Solt |
584dfa |
|
|
Jeremy Solt |
584dfa |
########################################
|
|
Jeremy Solt |
584dfa |
## <summary>
|
|
Jeremy Solt |
584dfa |
## Allow domain to manage icecast log files
|
|
Jeremy Solt |
584dfa |
## </summary>
|
|
Jeremy Solt |
584dfa |
## <param name="domain">
|
|
Jeremy Solt |
584dfa |
## <summary>
|
|
Jeremy Solt |
584dfa |
## Domain allow access.
|
|
Jeremy Solt |
584dfa |
## </summary>
|
|
Jeremy Solt |
584dfa |
## </param>
|
|
Jeremy Solt |
584dfa |
#
|
|
Jeremy Solt |
584dfa |
interface(`icecast_manage_log',`
|
|
Jeremy Solt |
584dfa |
gen_require(`
|
|
Jeremy Solt |
584dfa |
type icecast_log_t;
|
|
Jeremy Solt |
584dfa |
')
|
|
Jeremy Solt |
584dfa |
|
|
Jeremy Solt |
584dfa |
logging_search_logs($1)
|
|
Jeremy Solt |
584dfa |
manage_files_pattern($1, icecast_log_t, icecast_log_t)
|
|
Jeremy Solt |
584dfa |
')
|
|
Jeremy Solt |
584dfa |
|
|
Jeremy Solt |
584dfa |
########################################
|
|
Jeremy Solt |
584dfa |
## <summary>
|
|
Chris PeBenito |
340af1 |
## All of the rules required to administrate
|
|
Jeremy Solt |
584dfa |
## an icecast environment
|
|
Jeremy Solt |
584dfa |
## </summary>
|
|
Jeremy Solt |
584dfa |
## <param name="domain">
|
|
Jeremy Solt |
584dfa |
## <summary>
|
|
Jeremy Solt |
584dfa |
## Domain allowed access.
|
|
Jeremy Solt |
584dfa |
## </summary>
|
|
Jeremy Solt |
584dfa |
## </param>
|
|
Jeremy Solt |
584dfa |
## <param name="role">
|
|
Jeremy Solt |
584dfa |
## <summary>
|
|
Jeremy Solt |
584dfa |
## Role allowed access.
|
|
Jeremy Solt |
584dfa |
## </summary>
|
|
Jeremy Solt |
584dfa |
## </param>
|
|
Jeremy Solt |
584dfa |
## <rolecap/>
|
|
Jeremy Solt |
584dfa |
#
|
|
Jeremy Solt |
584dfa |
interface(`icecast_admin',`
|
|
Jeremy Solt |
584dfa |
gen_require(`
|
|
Jeremy Solt |
584dfa |
type icecast_t, icecast_initrc_exec_t;
|
|
Jeremy Solt |
584dfa |
')
|
|
Jeremy Solt |
584dfa |
|
|
Dominick Grift |
aa5baa |
allow $1 icecast_t:process { ptrace signal_perms };
|
|
Chris PeBenito |
340af1 |
ps_process_pattern($1, icecast_t)
|
|
Chris PeBenito |
340af1 |
|
|
Jeremy Solt |
584dfa |
# Allow icecast_t to restart the apache service
|
|
Jeremy Solt |
584dfa |
icecast_initrc_domtrans($1)
|
|
Jeremy Solt |
584dfa |
domain_system_change_exemption($1)
|
|
Jeremy Solt |
584dfa |
role_transition $2 icecast_initrc_exec_t system_r;
|
|
Jeremy Solt |
584dfa |
allow $2 system_r;
|
|
Jeremy Solt |
584dfa |
|
|
Jeremy Solt |
584dfa |
icecast_manage_pid_files($1)
|
|
Jeremy Solt |
584dfa |
icecast_manage_log($1)
|
|
Jeremy Solt |
584dfa |
')
|