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 885b83
##	<summary>
Chris PeBenito 0f707d
##	The type of the process performing this action.
Chris PeBenito 885b83
##	</summary>
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
	')
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 885b83
##	<summary>
Chris PeBenito 0f707d
##	Domain allowed access.
Chris PeBenito 885b83
##	</summary>
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
	')
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 671673
##	Append squid logs.
Chris PeBenito 671673
## </summary>
Chris PeBenito 671673
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito 671673
##	Domain allowed access.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 671673
## </param>
Chris PeBenito 671673
#
Chris PeBenito 671673
interface(`squid_read_log',`
Chris PeBenito 671673
	gen_require(`
Chris PeBenito 671673
		type squid_log_t;
Chris PeBenito 671673
	')
Chris PeBenito 671673
Chris PeBenito 671673
	logging_search_logs($1)
Chris PeBenito 671673
	allow $1 squid_log_t:dir search_dir_perms;
Chris PeBenito 671673
	allow $1 squid_log_t:file r_file_perms;
Chris PeBenito 671673
')
Chris PeBenito 671673
Chris PeBenito 671673
########################################
Chris PeBenito 671673
## <summary>
Chris PeBenito 671673
##	Append squid logs.
Chris PeBenito 671673
## </summary>
Chris PeBenito 671673
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito 671673
##	Domain allowed access.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 671673
## </param>
Chris PeBenito 671673
#
Chris PeBenito 671673
interface(`squid_append_log',`
Chris PeBenito 671673
	gen_require(`
Chris PeBenito 671673
		type squid_log_t;
Chris PeBenito 671673
	')
Chris PeBenito 671673
Chris PeBenito 671673
	logging_search_logs($1)
Chris PeBenito 671673
	allow $1 squid_log_t:dir search_dir_perms;
Chris PeBenito 671673
	allow $1 squid_log_t:file { getattr append };
Chris PeBenito 671673
')
Chris PeBenito 671673
Chris PeBenito 671673
########################################
Chris PeBenito 671673
## <summary>
Chris PeBenito 671673
##	Create, read, write, and delete
Chris PeBenito 671673
##	squid logs.
Chris PeBenito 671673
## </summary>
Chris PeBenito 671673
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito 671673
##	Domain allowed access.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 671673
## </param>
Chris PeBenito 671673
#
Chris PeBenito 671673
interface(`squid_manage_logs',`
Chris PeBenito 671673
	gen_require(`
Chris PeBenito 671673
		type squid_log_t;
Chris PeBenito 671673
	')
Chris PeBenito 671673
Chris PeBenito 671673
	logging_search_logs($1)
Chris PeBenito 671673
	allow $1 squid_log_t:dir rw_dir_perms;
Chris PeBenito 671673
	allow $1 squid_log_t:file create_file_perms;
Chris PeBenito 671673
')
Chris PeBenito 671673
Chris PeBenito 671673
########################################
Chris PeBenito 671673
## <summary>
Chris PeBenito 0f707d
##	Use squid services by connecting over TCP.
Chris PeBenito 0f707d
## </summary>
Chris PeBenito 0f707d
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito 0f707d
##	Domain allowed access.
Chris PeBenito 885b83
##	</summary>
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
	')
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
')