|
Chris PeBenito |
9570b2 |
policy_module(varnishd, 1.1.0)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
########################################
|
|
Chris PeBenito |
267d9c |
#
|
|
Chris PeBenito |
267d9c |
# Declarations
|
|
Chris PeBenito |
267d9c |
#
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
## <desc>
|
|
Chris PeBenito |
267d9c |
##
|
|
Chris PeBenito |
267d9c |
## Allow varnishd to connect to all ports,
|
|
Chris PeBenito |
267d9c |
## not just HTTP.
|
|
Chris PeBenito |
267d9c |
##
|
|
Chris PeBenito |
267d9c |
## </desc>
|
|
Chris PeBenito |
267d9c |
gen_tunable(varnishd_connect_any, false)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
type varnishd_t;
|
|
Chris PeBenito |
267d9c |
type varnishd_exec_t;
|
|
Chris PeBenito |
267d9c |
init_daemon_domain(varnishd_t, varnishd_exec_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
type varnishd_initrc_exec_t;
|
|
Chris PeBenito |
267d9c |
init_script_file(varnishd_initrc_exec_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
type varnishd_etc_t;
|
|
Chris PeBenito |
267d9c |
files_type(varnishd_etc_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
type varnishd_tmp_t;
|
|
Chris PeBenito |
267d9c |
files_tmp_file(varnishd_tmp_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
type varnishd_var_lib_t;
|
|
Chris PeBenito |
267d9c |
files_type(varnishd_var_lib_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
type varnishd_var_run_t;
|
|
Chris PeBenito |
267d9c |
files_pid_file(varnishd_var_run_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
type varnishlog_t;
|
|
Chris PeBenito |
267d9c |
type varnishlog_exec_t;
|
|
Chris PeBenito |
267d9c |
init_daemon_domain(varnishlog_t, varnishlog_exec_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
type varnishlog_initrc_exec_t;
|
|
Chris PeBenito |
267d9c |
init_script_file(varnishlog_initrc_exec_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
type varnishlog_var_run_t;
|
|
Chris PeBenito |
267d9c |
files_pid_file(varnishlog_var_run_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
type varnishlog_log_t;
|
|
Chris PeBenito |
267d9c |
files_type(varnishlog_log_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
########################################
|
|
Chris PeBenito |
267d9c |
#
|
|
Chris PeBenito |
267d9c |
# varnishd local policy
|
|
Chris PeBenito |
267d9c |
#
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
allow varnishd_t self:capability { dac_override ipc_lock setuid setgid };
|
|
Chris PeBenito |
267d9c |
allow varnishd_t self:process signal;
|
|
Chris PeBenito |
267d9c |
allow varnishd_t self:fifo_file rw_fifo_file_perms;
|
|
Chris PeBenito |
267d9c |
allow varnishd_t self:tcp_socket create_stream_socket_perms;
|
|
Chris PeBenito |
267d9c |
allow varnishd_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
read_files_pattern(varnishd_t, varnishd_etc_t, varnishd_etc_t)
|
|
Chris PeBenito |
267d9c |
list_dirs_pattern(varnishd_t, varnishd_etc_t, varnishd_etc_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
manage_dirs_pattern(varnishd_t, varnishd_tmp_t, varnishd_tmp_t)
|
|
Chris PeBenito |
267d9c |
manage_files_pattern(varnishd_t, varnishd_tmp_t, varnishd_tmp_t)
|
|
Chris PeBenito |
267d9c |
files_tmp_filetrans(varnishd_t, varnishd_tmp_t, { file dir })
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
exec_files_pattern(varnishd_t, varnishd_var_lib_t, varnishd_var_lib_t)
|
|
Chris PeBenito |
267d9c |
manage_dirs_pattern(varnishd_t, varnishd_var_lib_t, varnishd_var_lib_t)
|
|
Chris PeBenito |
267d9c |
manage_files_pattern(varnishd_t, varnishd_var_lib_t, varnishd_var_lib_t)
|
|
Chris PeBenito |
267d9c |
files_var_lib_filetrans(varnishd_t, varnishd_var_lib_t, { dir file })
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
manage_files_pattern(varnishd_t, varnishd_var_run_t, varnishd_var_run_t)
|
|
Chris PeBenito |
267d9c |
files_pid_filetrans(varnishd_t, varnishd_var_run_t, { file })
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
kernel_read_system_state(varnishd_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
corecmd_exec_bin(varnishd_t)
|
|
Chris PeBenito |
267d9c |
corecmd_exec_shell(varnishd_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
corenet_tcp_sendrecv_generic_if(varnishd_t)
|
|
Chris PeBenito |
267d9c |
corenet_tcp_bind_generic_node(varnishd_t)
|
|
Chris PeBenito |
267d9c |
corenet_tcp_bind_http_port(varnishd_t)
|
|
Chris PeBenito |
267d9c |
corenet_tcp_bind_http_cache_port(varnishd_t)
|
|
Chris PeBenito |
45b975 |
corenet_tcp_bind_varnishd_port(varnishd_t)
|
|
Chris PeBenito |
267d9c |
corenet_tcp_connect_http_cache_port(varnishd_t)
|
|
Chris PeBenito |
267d9c |
corenet_tcp_connect_http_port(varnishd_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
dev_read_urand(varnishd_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
fs_getattr_all_fs(varnishd_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
auth_use_nsswitch(varnishd_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
logging_send_syslog_msg(varnishd_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
miscfiles_read_localization(varnishd_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
sysnet_read_config(varnishd_t)
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
tunable_policy(`varnishd_connect_any',`
|
|
Chris PeBenito |
267d9c |
corenet_tcp_connect_all_ports(varnishd_t)
|
|
Chris PeBenito |
267d9c |
corenet_tcp_bind_all_ports(varnishd_t)
|
|
Chris PeBenito |
267d9c |
')
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
#######################################
|
|
Chris PeBenito |
267d9c |
#
|
|
Chris PeBenito |
267d9c |
# varnishlog local policy
|
|
Chris PeBenito |
267d9c |
#
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
manage_files_pattern(varnishlog_t, varnishlog_var_run_t, varnishlog_var_run_t)
|
|
Chris PeBenito |
267d9c |
files_pid_filetrans(varnishlog_t, varnishlog_var_run_t, { file })
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
manage_dirs_pattern(varnishlog_t, varnishlog_log_t, varnishlog_log_t)
|
|
Chris PeBenito |
267d9c |
manage_files_pattern(varnishlog_t, varnishlog_log_t, varnishlog_log_t)
|
|
Chris PeBenito |
267d9c |
logging_log_filetrans(varnishlog_t, varnishlog_log_t, { file dir })
|
|
Chris PeBenito |
267d9c |
|
|
Chris PeBenito |
267d9c |
files_search_var_lib(varnishlog_t)
|
|
Chris PeBenito |
267d9c |
read_files_pattern(varnishlog_t, varnishd_var_lib_t, varnishd_var_lib_t)
|