|
Dominick Grift |
920de50 |
## <summary>ShoutCast compatible streaming media server.</summary>
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Execute a domain transition to run icecast.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## <param name="domain">
|
|
Chris PeBenito |
9401ae1 |
## <summary>
|
|
Chris PeBenito |
9401ae1 |
## Domain allowed to transition.
|
|
Chris PeBenito |
9401ae1 |
## </summary>
|
|
|
1ec3d1a |
## </param>
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
interface(`icecast_domtrans',`
|
|
|
1ec3d1a |
gen_require(`
|
|
|
1ec3d1a |
type icecast_t, icecast_exec_t;
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
Dominick Grift |
920de50 |
corecmd_search_bin($1)
|
|
|
1ec3d1a |
domtrans_pattern($1, icecast_exec_t, icecast_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
## <summary>
|
|
Dominick Grift |
920de50 |
## Send generic signals to icecast.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## <param name="domain">
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Domain allowed access.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## </param>
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
interface(`icecast_signal',`
|
|
|
1ec3d1a |
gen_require(`
|
|
|
1ec3d1a |
type icecast_t;
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
allow $1 icecast_t:process signal;
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Execute icecast server in the icecast domain.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## <param name="domain">
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Domain allowed to transition.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## </param>
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
interface(`icecast_initrc_domtrans',`
|
|
|
1ec3d1a |
gen_require(`
|
|
|
1ec3d1a |
type icecast_initrc_exec_t;
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
init_labeled_script_domtrans($1, icecast_initrc_exec_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
## <summary>
|
|
Dominick Grift |
920de50 |
## Read icecast pid files.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## <param name="domain">
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Domain allowed access.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## </param>
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
interface(`icecast_read_pid_files',`
|
|
|
1ec3d1a |
gen_require(`
|
|
|
1ec3d1a |
type icecast_var_run_t;
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
files_search_pids($1)
|
|
|
1ec3d1a |
allow $1 icecast_var_run_t:file read_file_perms;
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
## <summary>
|
|
Dominick Grift |
920de50 |
## Create, read, write, and delete
|
|
Dominick Grift |
920de50 |
## icecast pid files.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## <param name="domain">
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Domain allowed access.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## </param>
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
interface(`icecast_manage_pid_files',`
|
|
|
1ec3d1a |
gen_require(`
|
|
|
1ec3d1a |
type icecast_var_run_t;
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
files_search_pids($1)
|
|
|
1ec3d1a |
manage_files_pattern($1, icecast_var_run_t, icecast_var_run_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
## <summary>
|
|
Dominick Grift |
920de50 |
## Read icecast log files.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## <param name="domain">
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Domain allowed access.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## </param>
|
|
|
1ec3d1a |
## <rolecap/>
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
interface(`icecast_read_log',`
|
|
|
1ec3d1a |
gen_require(`
|
|
|
1ec3d1a |
type icecast_log_t;
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
logging_search_logs($1)
|
|
|
1ec3d1a |
read_files_pattern($1, icecast_log_t, icecast_log_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
## <summary>
|
|
Dominick Grift |
920de50 |
## Append icecast log files.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## <param name="domain">
|
|
Chris PeBenito |
9401ae1 |
## <summary>
|
|
Chris PeBenito |
9401ae1 |
## Domain allowed access.
|
|
Chris PeBenito |
9401ae1 |
## </summary>
|
|
|
1ec3d1a |
## </param>
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
interface(`icecast_append_log',`
|
|
|
1ec3d1a |
gen_require(`
|
|
|
1ec3d1a |
type icecast_log_t;
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
logging_search_logs($1)
|
|
|
1ec3d1a |
append_files_pattern($1, icecast_log_t, icecast_log_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
## <summary>
|
|
Dominick Grift |
920de50 |
## Create, read, write, and delete
|
|
Dominick Grift |
920de50 |
## icecast log files.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## <param name="domain">
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Domain allow access.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## </param>
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
interface(`icecast_manage_log',`
|
|
|
1ec3d1a |
gen_require(`
|
|
|
1ec3d1a |
type icecast_log_t;
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
logging_search_logs($1)
|
|
|
1ec3d1a |
manage_files_pattern($1, icecast_log_t, icecast_log_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
## <summary>
|
|
Dominick Grift |
920de50 |
## All of the rules required to
|
|
Dominick Grift |
920de50 |
## administrate an icecast environment.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## <param name="domain">
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Domain allowed access.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## </param>
|
|
|
1ec3d1a |
## <param name="role">
|
|
|
1ec3d1a |
## <summary>
|
|
|
1ec3d1a |
## Role allowed access.
|
|
|
1ec3d1a |
## </summary>
|
|
|
1ec3d1a |
## </param>
|
|
|
1ec3d1a |
## <rolecap/>
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
interface(`icecast_admin',`
|
|
|
1ec3d1a |
gen_require(`
|
|
Dominick Grift |
920de50 |
type icecast_t, icecast_initrc_exec_t, icecast_log_t;
|
|
Dominick Grift |
920de50 |
type icecast_var_run_t;
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
allow $1 icecast_t:process signal_perms;
|
|
|
1ec3d1a |
ps_process_pattern($1, icecast_t)
|
|
|
521831c |
|
|
|
1ec3d1a |
tunable_policy(`deny_ptrace',`',`
|
|
|
1ec3d1a |
allow $1 icecast_t:process ptrace;
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
# Allow icecast_t to restart the apache service
|
|
|
1ec3d1a |
icecast_initrc_domtrans($1)
|
|
|
1ec3d1a |
domain_system_change_exemption($1)
|
|
|
1ec3d1a |
role_transition $2 icecast_initrc_exec_t system_r;
|
|
|
1ec3d1a |
allow $2 system_r;
|
|
|
1ec3d1a |
|
|
Dominick Grift |
920de50 |
allow $1 icecast_t:process { ptrace signal_perms };
|
|
Dominick Grift |
920de50 |
ps_process_pattern($1, icecast_t)
|
|
Chris PeBenito |
9401ae1 |
|
|
Dominick Grift |
920de50 |
logging_search_logs($1)
|
|
Dominick Grift |
920de50 |
admin_pattern($1, icecast_log_t)
|
|
Chris PeBenito |
9401ae1 |
|
|
Dominick Grift |
920de50 |
files_search_pids($1)
|
|
Dominick Grift |
920de50 |
admin_pattern($1, icecast_var_run_t)
|
|
|
1ec3d1a |
')
|