|
Chris PeBenito |
267d9c |
## <summary>Varnishd http accelerator daemon</summary>
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
#######################################
|
|
Chris PeBenito |
267d9c |
## <summary>
|
|
Chris PeBenito |
267d9c |
## Execute varnishd in the varnishd domain.
|
|
Chris PeBenito |
267d9c |
## </summary>
|
|
Chris PeBenito |
267d9c |
## <param name="domain">
|
|
Chris PeBenito |
267d9c |
## <summary>
|
|
Chris PeBenito |
267d9c |
## The type of the process performing this action.
|
|
Chris PeBenito |
267d9c |
## </summary>
|
|
Chris PeBenito |
267d9c |
## </param>
|
|
Chris PeBenito |
267d9c |
#
|
|
Chris PeBenito |
267d9c |
interface(`varnishd_domtrans',`
|
|
Chris PeBenito |
267d9c |
gen_require(`
|
|
Chris PeBenito |
267d9c |
type varnishd_t, varnishd_exec_t;
|
|
Chris PeBenito |
267d9c |
')
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
corecmd_search_bin($1)
|
|
Chris PeBenito |
267d9c |
domtrans_pattern($1, varnishd_exec_t, varnishd_t)
|
|
Chris PeBenito |
267d9c |
')
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
#######################################
|
|
Chris PeBenito |
267d9c |
## <summary>
|
|
Chris PeBenito |
267d9c |
## Execute varnishd
|
|
Chris PeBenito |
267d9c |
## </summary>
|
|
Chris PeBenito |
267d9c |
## <param name="domain">
|
|
Chris PeBenito |
267d9c |
## <summary>
|
|
Chris PeBenito |
267d9c |
## The type of the process performing this action.
|
|
Chris PeBenito |
267d9c |
## </summary>
|
|
Chris PeBenito |
267d9c |
## </param>
|
|
Chris PeBenito |
267d9c |
#
|
|
Chris PeBenito |
267d9c |
interface(`varnishd_exec',`
|
|
Chris PeBenito |
267d9c |
gen_require(`
|
|
Chris PeBenito |
267d9c |
type varnishd_exec_t;
|
|
Chris PeBenito |
267d9c |
')
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
can_exec($1, varnishd_exec_t)
|
|
Chris PeBenito |
267d9c |
')
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
######################################
|
|
Chris PeBenito |
267d9c |
## <summary>
|
|
Chris PeBenito |
267d9c |
## Read varnishd configuration file.
|
|
Chris PeBenito |
267d9c |
## </summary>
|
|
Chris PeBenito |
267d9c |
## <param name="domain">
|
|
Chris PeBenito |
267d9c |
## <summary>
|
|
Chris PeBenito |
267d9c |
## Domain allowed access.
|
|
Chris PeBenito |
267d9c |
## </summary>
|
|
Chris PeBenito |
267d9c |
## </param>
|
|
Chris PeBenito |
267d9c |
#
|
|
Chris PeBenito |
267d9c |
interface(`varnishd_read_config',`
|
|
Chris PeBenito |
267d9c |
gen_require(`
|
|
Chris PeBenito |
267d9c |
type varnishd_etc_t;
|
|
Chris PeBenito |
267d9c |
')
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
files_search_etc($1)
|
|
Chris PeBenito |
267d9c |
read_files_pattern($1, varnishd_etc_t, varnishd_etc_t)
|
|
Chris PeBenito |
267d9c |
')
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
#######################################
|
|
Chris PeBenito |
267d9c |
## <summary>
|
|
Chris PeBenito |
267d9c |
## Read varnish logs.
|
|
Chris PeBenito |
267d9c |
## </summary>
|
|
Chris PeBenito |
267d9c |
## <param name="domain">
|
|
Chris PeBenito |
267d9c |
## <summary>
|
|
Chris PeBenito |
267d9c |
## Domain allowed access.
|
|
Chris PeBenito |
267d9c |
## </summary>
|
|
Chris PeBenito |
267d9c |
## </param>
|
|
Chris PeBenito |
267d9c |
#
|
|
Chris PeBenito |
b67201 |
interface(`varnishd_read_log',`
|
|
Chris PeBenito |
267d9c |
gen_require(`
|
|
Chris PeBenito |
267d9c |
type varnishlog_log_t;
|
|
Chris PeBenito |
267d9c |
')
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
logging_search_logs($1)
|
|
Chris PeBenito |
267d9c |
read_files_pattern($1, varnishlog_log_t, varnishlog_log_t)
|
|
Chris PeBenito |
267d9c |
')
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
######################################
|
|
Chris PeBenito |
267d9c |
## <summary>
|
|
Chris PeBenito |
267d9c |
## Append varnish logs.
|
|
Chris PeBenito |
267d9c |
## </summary>
|
|
Chris PeBenito |
267d9c |
## <param name="domain">
|
|
Chris PeBenito |
267d9c |
## <summary>
|
|
Chris PeBenito |
267d9c |
## Domain allowed access.
|
|
Chris PeBenito |
267d9c |
## </summary>
|
|
Chris PeBenito |
267d9c |
## </param>
|
|
Chris PeBenito |
267d9c |
#
|
|
Chris PeBenito |
b67201 |
interface(`varnishd_append_log',`
|
|
Chris PeBenito |
267d9c |
gen_require(`
|
|
Chris PeBenito |
267d9c |
type varnishlog_log_t;
|
|
Chris PeBenito |
267d9c |
')
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
logging_search_logs($1)
|
|
Chris PeBenito |
267d9c |
append_files_pattern($1, varnishlog_log_t, varnishlog_log_t)
|
|
Chris PeBenito |
267d9c |
')
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
#####################################
|
|
Chris PeBenito |
267d9c |
## <summary>
|
|
Chris PeBenito |
267d9c |
## Manage varnish logs.
|
|
Chris PeBenito |
267d9c |
## </summary>
|
|
Chris PeBenito |
267d9c |
## <param name="domain">
|
|
Chris PeBenito |
267d9c |
## <summary>
|
|
Chris PeBenito |
267d9c |
## Domain allowed access.
|
|
Chris PeBenito |
267d9c |
## </summary>
|
|
Chris PeBenito |
267d9c |
## </param>
|
|
Chris PeBenito |
267d9c |
#
|
|
Chris PeBenito |
b67201 |
interface(`varnishd_manage_log',`
|
|
Chris PeBenito |
267d9c |
gen_require(`
|
|
Chris PeBenito |
267d9c |
type varnishlog_log_t;
|
|
Chris PeBenito |
267d9c |
')
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
logging_search_logs($1)
|
|
Chris PeBenito |
267d9c |
manage_files_pattern($1, varnishlog_log_t, varnishlog_log_t)
|
|
Chris PeBenito |
267d9c |
')
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
######################################
|
|
Chris PeBenito |
267d9c |
## <summary>
|
|
Chris PeBenito |
267d9c |
## All of the rules required to administrate
|
|
Chris PeBenito |
267d9c |
## an varnishlog environment
|
|
Chris PeBenito |
267d9c |
## </summary>
|
|
Chris PeBenito |
267d9c |
## <param name="domain">
|
|
Chris PeBenito |
267d9c |
## <summary>
|
|
Chris PeBenito |
267d9c |
## Domain allowed access.
|
|
Chris PeBenito |
267d9c |
## </summary>
|
|
Chris PeBenito |
267d9c |
## </param>
|
|
Chris PeBenito |
267d9c |
## <param name="role">
|
|
Chris PeBenito |
267d9c |
## <summary>
|
|
Chris PeBenito |
267d9c |
## The role to be allowed to manage the varnishlog domain.
|
|
Chris PeBenito |
267d9c |
## </summary>
|
|
Chris PeBenito |
267d9c |
## </param>
|
|
Chris PeBenito |
267d9c |
## <rolecap/>
|
|
Chris PeBenito |
267d9c |
#
|
|
Chris PeBenito |
267d9c |
interface(`varnishd_admin_varnishlog',`
|
|
Chris PeBenito |
267d9c |
gen_require(`
|
|
Chris PeBenito |
267d9c |
type varnishlog_t;
|
|
Chris PeBenito |
267d9c |
type varnishlog_var_run_t, varnishlog_log_t;
|
|
Chris PeBenito |
267d9c |
type varnishlog_initrc_exec_t;
|
|
Chris PeBenito |
267d9c |
')
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
allow $1 varnishlog_t:process { ptrace signal_perms };
|
|
Chris PeBenito |
267d9c |
ps_process_pattern($1, varnishlog_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
init_labeled_script_domtrans($1, varnishlog_initrc_exec_t)
|
|
Chris PeBenito |
267d9c |
domain_system_change_exemption($1)
|
|
Chris PeBenito |
267d9c |
role_transition $2 varnishlog_initrc_exec_t system_r;
|
|
Chris PeBenito |
267d9c |
allow $2 system_r;
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
files_search_pids($1)
|
|
Chris PeBenito |
267d9c |
admin_pattern($1, varnishlog_var_run_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
logging_list_logs($1)
|
|
Chris PeBenito |
267d9c |
admin_pattern($1, varnishlog_log_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
')
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
#######################################
|
|
Chris PeBenito |
267d9c |
## <summary>
|
|
Chris PeBenito |
267d9c |
## All of the rules required to administrate
|
|
Chris PeBenito |
267d9c |
## an varnishd environment
|
|
Chris PeBenito |
267d9c |
## </summary>
|
|
Chris PeBenito |
267d9c |
## <param name="domain">
|
|
Chris PeBenito |
267d9c |
## <summary>
|
|
Chris PeBenito |
267d9c |
## Domain allowed access.
|
|
Chris PeBenito |
267d9c |
## </summary>
|
|
Chris PeBenito |
267d9c |
## </param>
|
|
Chris PeBenito |
267d9c |
## <param name="role">
|
|
Chris PeBenito |
267d9c |
## <summary>
|
|
Chris PeBenito |
267d9c |
## The role to be allowed to manage the varnishd domain.
|
|
Chris PeBenito |
267d9c |
## </summary>
|
|
Chris PeBenito |
267d9c |
## </param>
|
|
Chris PeBenito |
267d9c |
## <rolecap/>
|
|
Chris PeBenito |
267d9c |
#
|
|
Chris PeBenito |
267d9c |
interface(`varnishd_admin',`
|
|
Chris PeBenito |
267d9c |
gen_require(`
|
|
Chris PeBenito |
267d9c |
type varnishd_t, varnishd_var_lib_t, varnishd_etc_t;
|
|
Chris PeBenito |
267d9c |
type varnishd_var_run_t, varnishd_tmp_t;
|
|
Chris PeBenito |
267d9c |
type varnishd_initrc_exec_t;
|
|
Chris PeBenito |
267d9c |
')
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
allow $1 varnishd_t:process { ptrace signal_perms };
|
|
Chris PeBenito |
267d9c |
ps_process_pattern($1, varnishd_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
init_labeled_script_domtrans($1, varnishd_initrc_exec_t)
|
|
Chris PeBenito |
267d9c |
domain_system_change_exemption($1)
|
|
Chris PeBenito |
267d9c |
role_transition $2 varnishd_initrc_exec_t system_r;
|
|
Chris PeBenito |
267d9c |
allow $2 system_r;
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
files_search_var_lib($1)
|
|
Chris PeBenito |
267d9c |
admin_pattern($1, varnishd_var_lib_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
files_search_etc($1)
|
|
Chris PeBenito |
267d9c |
admin_pattern($1, varnishd_etc_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
files_search_pids($1)
|
|
Chris PeBenito |
267d9c |
admin_pattern($1, varnishd_var_run_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
files_search_tmp($1)
|
|
Chris PeBenito |
267d9c |
admin_pattern($1, varnishd_tmp_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
')
|