|
Chris PeBenito |
0f707d |
## <summary>Squid caching http proxy server</summary>
|
|
Chris PeBenito |
0f707d |
|
|
Chris PeBenito |
0f707d |
########################################
|
|
Chris PeBenito |
0f707d |
## <summary>
|
|
Chris PeBenito |
0f707d |
## Execute squid in the squid domain.
|
|
Chris PeBenito |
0f707d |
## </summary>
|
|
Chris PeBenito |
0f707d |
## <param name="domain">
|
|
Chris PeBenito |
0f707d |
## The type of the process performing this action.
|
|
Chris PeBenito |
0f707d |
## </param>
|
|
Chris PeBenito |
0f707d |
#
|
|
Chris PeBenito |
0f707d |
interface(`squid_domtrans',`
|
|
Chris PeBenito |
0f707d |
gen_require(`
|
|
Chris PeBenito |
0f707d |
type squid_t, squid_exec_t;
|
|
Chris PeBenito |
0f707d |
class process sigchld;
|
|
Chris PeBenito |
0f707d |
class fd use;
|
|
Chris PeBenito |
0f707d |
class fifo_file rw_file_perms;
|
|
Chris PeBenito |
0f707d |
')
|
|
Chris PeBenito |
0f707d |
|
|
Chris PeBenito |
0f707d |
corecmd_search_sbin($1)
|
|
Chris PeBenito |
0f707d |
domain_auto_trans($1,squid_exec_t,squid_t)
|
|
Chris PeBenito |
0f707d |
|
|
Chris PeBenito |
0f707d |
allow $1 squid_t:fd use;
|
|
Chris PeBenito |
0f707d |
allow squid_t $1:fd use;
|
|
Chris PeBenito |
0f707d |
allow squid_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
0f707d |
allow squid_t $1:process sigchld;
|
|
Chris PeBenito |
0f707d |
')
|
|
Chris PeBenito |
0f707d |
|
|
Chris PeBenito |
0f707d |
########################################
|
|
Chris PeBenito |
0f707d |
## <summary>
|
|
Chris PeBenito |
0f707d |
## Read squid configuration file.
|
|
Chris PeBenito |
0f707d |
## </summary>
|
|
Chris PeBenito |
0f707d |
## <param name="domain">
|
|
Chris PeBenito |
0f707d |
## Domain allowed access.
|
|
Chris PeBenito |
0f707d |
## </param>
|
|
Chris PeBenito |
0f707d |
#
|
|
Chris PeBenito |
0f707d |
interface(`squid_read_config',`
|
|
Chris PeBenito |
0f707d |
gen_require(`
|
|
Chris PeBenito |
0f707d |
type squid_conf_t;
|
|
Chris PeBenito |
0f707d |
class file r_file_perms;
|
|
Chris PeBenito |
0f707d |
')
|
|
Chris PeBenito |
0f707d |
|
|
Chris PeBenito |
0f707d |
files_search_etc($1)
|
|
Chris PeBenito |
0f707d |
allow $1 squid_conf_t:file r_file_perms;
|
|
Chris PeBenito |
0f707d |
')
|
|
Chris PeBenito |
0f707d |
|
|
Chris PeBenito |
0f707d |
########################################
|
|
Chris PeBenito |
0f707d |
## <summary>
|
|
Chris PeBenito |
0f707d |
## Create, read, write, and delete
|
|
Chris PeBenito |
0f707d |
## squid logs.
|
|
Chris PeBenito |
0f707d |
## </summary>
|
|
Chris PeBenito |
0f707d |
## <param name="domain">
|
|
Chris PeBenito |
0f707d |
## Domain allowed access.
|
|
Chris PeBenito |
0f707d |
## </param>
|
|
Chris PeBenito |
0f707d |
#
|
|
Chris PeBenito |
0f707d |
interface(`squid_manage_logs',`
|
|
Chris PeBenito |
0f707d |
gen_require(`
|
|
Chris PeBenito |
0f707d |
type squid_log_t;
|
|
Chris PeBenito |
0f707d |
class dir rw_dir_perms;
|
|
Chris PeBenito |
0f707d |
class file create_file_perms;
|
|
Chris PeBenito |
0f707d |
')
|
|
Chris PeBenito |
0f707d |
|
|
Chris PeBenito |
0f707d |
logging_search_logs($1)
|
|
Chris PeBenito |
0f707d |
allow $1 squid_log_t:dir rw_dir_perms;
|
|
Chris PeBenito |
0f707d |
allow $1 squid_log_t:file create_file_perms;
|
|
Chris PeBenito |
0f707d |
')
|
|
Chris PeBenito |
0f707d |
|
|
Chris PeBenito |
0f707d |
########################################
|
|
Chris PeBenito |
0f707d |
## <summary>
|
|
Chris PeBenito |
0f707d |
## Use squid services by connecting over TCP.
|
|
Chris PeBenito |
0f707d |
## </summary>
|
|
Chris PeBenito |
0f707d |
## <param name="domain">
|
|
Chris PeBenito |
0f707d |
## Domain allowed access.
|
|
Chris PeBenito |
0f707d |
## </param>
|
|
Chris PeBenito |
0f707d |
#
|
|
Chris PeBenito |
0f707d |
interface(`squid_use',`
|
|
Chris PeBenito |
0f707d |
gen_require(`
|
|
Chris PeBenito |
0f707d |
type squid_t;
|
|
Chris PeBenito |
0f707d |
class tcp_socket { connectto acceptfrom recvfrom };
|
|
Chris PeBenito |
0f707d |
')
|
|
Chris PeBenito |
0f707d |
|
|
Chris PeBenito |
0f707d |
allow $1 squid_t:tcp_socket { connectto recvfrom };
|
|
Chris PeBenito |
0f707d |
allow squid_t $1:tcp_socket { acceptfrom recvfrom };
|
|
Chris PeBenito |
0f707d |
kernel_tcp_recvfrom($1)
|
|
Chris PeBenito |
0f707d |
')
|