Chris PeBenito 17de1b
## <summary>Squid caching http proxy server</summary>
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute squid in the squid domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Dominick Grift 288845
##	Domain allowed to transition.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`squid_domtrans',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type squid_t, squid_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 8021cb
	corecmd_search_bin($1)
Chris PeBenito 0bfccd
	domtrans_pattern($1, squid_exec_t, squid_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito a46b60
## <summary>
Chris PeBenito 339235
##	Execute squid 
Chris PeBenito 339235
## </summary>
Chris PeBenito 339235
## <param name="domain">
Chris PeBenito 339235
##	<summary>
Chris PeBenito a72e42
##	Domain allowed access.
Chris PeBenito 339235
##	</summary>
Chris PeBenito 339235
## </param>
Chris PeBenito 339235
#
Chris PeBenito 339235
interface(`squid_exec',`
Chris PeBenito 339235
	gen_require(`
Chris PeBenito 339235
		type squid_exec_t;
Chris PeBenito 339235
	')
Chris PeBenito 339235
Chris PeBenito 339235
	can_exec($1, squid_exec_t)
Chris PeBenito 339235
')
Chris PeBenito 339235
Chris PeBenito 339235
########################################
Chris PeBenito 339235
## <summary>
Chris PeBenito a46b60
##	Send generic signals to squid.
Chris PeBenito a46b60
## </summary>
Chris PeBenito a46b60
## <param name="domain">
Chris PeBenito a46b60
##	<summary>
Chris PeBenito a46b60
##	Domain allowed access.
Chris PeBenito a46b60
##	</summary>
Chris PeBenito a46b60
## </param>
Chris PeBenito a46b60
#
Chris PeBenito a46b60
interface(`squid_signal',`
Chris PeBenito a46b60
	gen_require(`
Chris PeBenito a46b60
		type squid_t;
Chris PeBenito a46b60
	')
Chris PeBenito a46b60
Chris PeBenito a46b60
	allow $1 squid_t:process signal;
Chris PeBenito a46b60
')
Chris PeBenito a46b60
Chris PeBenito a46b60
########################################
Chris PeBenito a46b60
## <summary>
Chris PeBenito a46b60
##	Allow read and write squid
Chris PeBenito a46b60
##	unix domain stream sockets.
Chris PeBenito a46b60
## </summary>
Chris PeBenito a46b60
## <param name="domain">
Chris PeBenito a46b60
##	<summary>
Chris PeBenito a46b60
##	Domain allowed access.
Chris PeBenito a46b60
##	</summary>
Chris PeBenito a46b60
## </param>
Chris PeBenito a46b60
#
Chris PeBenito a46b60
interface(`squid_rw_stream_sockets',`
Chris PeBenito a46b60
	gen_require(`
Chris PeBenito a46b60
		type squid_t;
Chris PeBenito a46b60
	')
Chris PeBenito a46b60
Dominick Grift 59c034
	allow $1 squid_t:unix_stream_socket rw_socket_perms;
Chris PeBenito a46b60
')
Chris PeBenito a46b60
Chris PeBenito a46b60
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito b129e2
##	Do not audit attempts to search squid cache dirs
Chris PeBenito b129e2
## </summary>
Chris PeBenito b129e2
## <param name="domain">
Chris PeBenito b129e2
##	<summary>
Chris PeBenito b129e2
##	Domain to not audit.
Chris PeBenito b129e2
##	</summary>
Chris PeBenito b129e2
## </param>
Chris PeBenito b129e2
#
Chris PeBenito b129e2
interface(`squid_dontaudit_search_cache',`
Chris PeBenito b129e2
	gen_require(`
Chris PeBenito b129e2
		type squid_cache_t;
Chris PeBenito b129e2
	')
Chris PeBenito b129e2
Chris PeBenito b129e2
	dontaudit $1 squid_cache_t:dir search_dir_perms;
Chris PeBenito b129e2
')
Chris PeBenito b129e2
Chris PeBenito b129e2
########################################
Chris PeBenito b129e2
## <summary>
Chris PeBenito 17de1b
##	Read squid configuration file.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`squid_read_config',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type squid_conf_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito b129e2
	read_files_pattern($1, squid_conf_t, squid_conf_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Append squid logs.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`squid_read_log',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type squid_log_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	logging_search_logs($1)
Chris PeBenito 0bfccd
	read_files_pattern($1, squid_log_t, squid_log_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Append squid logs.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`squid_append_log',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type squid_log_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	logging_search_logs($1)
Chris PeBenito 0bfccd
	append_files_pattern($1, squid_log_t, squid_log_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Create, read, write, and delete
Chris PeBenito 17de1b
##	squid logs.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`squid_manage_logs',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type squid_log_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	logging_search_logs($1)
Chris PeBenito 0bfccd
	manage_files_pattern($1, squid_log_t, squid_log_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 33c7e6
##	Use squid services by connecting over TCP.  (Deprecated)
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`squid_use',`
Chris PeBenito 33c7e6
	refpolicywarn(`$0($*) has been deprecated.')
Chris PeBenito 17de1b
')
Chris PeBenito e87221
Chris PeBenito e87221
########################################
Chris PeBenito e87221
## <summary>
Chris PeBenito e87221
##	All of the rules required to administrate 
Chris PeBenito e87221
##	an squid environment
Chris PeBenito e87221
## </summary>
Chris PeBenito e87221
## <param name="domain">
Chris PeBenito e87221
##	<summary>
Chris PeBenito e87221
##	Domain allowed access.
Chris PeBenito e87221
##	</summary>
Chris PeBenito e87221
## </param>
Chris PeBenito e87221
## <param name="role">
Chris PeBenito e87221
##	<summary>
Chris PeBenito e87221
##	The role to be allowed to manage the squid domain.
Chris PeBenito e87221
##	</summary>
Chris PeBenito e87221
## </param>
Chris PeBenito e87221
## <rolecap/>
Chris PeBenito e87221
#
Chris PeBenito e87221
interface(`squid_admin',`
Chris PeBenito e87221
	gen_require(`
Chris PeBenito e87221
		type squid_t, squid_cache_t, squid_conf_t;
Dominick Grift f26267
		type squid_log_t, squid_var_run_t, squid_initrc_exec_t;
Chris PeBenito e87221
	')
Chris PeBenito e87221
Chris PeBenito e87221
	allow $1 squid_t:process { ptrace signal_perms };
Chris PeBenito e87221
	ps_process_pattern($1, squid_t)
Chris PeBenito 2a9837
Chris PeBenito e87221
	init_labeled_script_domtrans($1, squid_initrc_exec_t)
Chris PeBenito e87221
	domain_system_change_exemption($1)
Chris PeBenito e87221
	role_transition $2 squid_initrc_exec_t system_r;
Chris PeBenito e87221
	allow $2 system_r;
Chris PeBenito e87221
Chris PeBenito e87221
	files_list_var($1)
Chris PeBenito e87221
	admin_pattern($1, squid_cache_t)
Chris PeBenito e87221
Chris PeBenito e87221
	files_list_etc($1)
Chris PeBenito e87221
	admin_pattern($1, squid_conf_t)
Chris PeBenito e87221
Chris PeBenito e87221
	logging_list_logs($1)
Chris PeBenito e87221
	admin_pattern($1, squid_log_t)
Chris PeBenito e87221
Chris PeBenito e87221
	files_list_pids($1)
Chris PeBenito e87221
	admin_pattern($1, squid_var_run_t)
Chris PeBenito e87221
')