Chris PeBenito e99359
## <summary>Pyzor is a distributed, collaborative spam detection and filtering network.</summary>
Chris PeBenito e99359
Chris PeBenito e99359
########################################
Chris PeBenito e99359
## <summary>
Chris PeBenito e99359
##	Execute pyzor with a domain transition.
Chris PeBenito e99359
## </summary>
Chris PeBenito e99359
## <param name="domain">
Chris PeBenito e99359
##	<summary>
Chris PeBenito e99359
##	Domain allowed access.
Chris PeBenito e99359
##	</summary>
Chris PeBenito e99359
## </param>
Chris PeBenito e99359
#
Chris PeBenito e99359
interface(`pyzor_domtrans',`
Chris PeBenito e99359
	gen_require(`
Chris PeBenito e99359
		type pyzor_exec_t, pyzor_t;
Chris PeBenito e99359
	')
Chris PeBenito e99359
Chris PeBenito e99359
	files_search_usr($1)
Chris PeBenito e99359
	corecmd_search_bin($1)
Chris PeBenito e99359
	domain_auto_trans($1,pyzor_exec_t,pyzor_t)
Chris PeBenito e99359
Chris PeBenito e99359
	allow $1 pyzor_t:fd use;
Chris PeBenito e99359
	allow pyzor_t $1:fd use;
Chris PeBenito e99359
	allow pyzor_t $1:fifo_file rw_file_perms;
Chris PeBenito e99359
	allow pyzor_t $1:process sigchld;
Chris PeBenito e99359
')
Chris PeBenito e99359
Chris PeBenito e99359
########################################
Chris PeBenito e99359
## <summary>
Chris PeBenito e99359
##	Execute pyzor in the caller domain.
Chris PeBenito e99359
## </summary>
Chris PeBenito e99359
## <param name="domain">
Chris PeBenito e99359
##	<summary>
Chris PeBenito e99359
##	Domain allowed access.
Chris PeBenito e99359
##	</summary>
Chris PeBenito e99359
## </param>
Chris PeBenito e99359
#
Chris PeBenito e99359
interface(`pyzor_exec',`
Chris PeBenito e99359
	gen_require(`
Chris PeBenito e99359
		type pyzor_exec_t;
Chris PeBenito e99359
	')
Chris PeBenito e99359
Chris PeBenito e99359
	files_search_usr($1)
Chris PeBenito e99359
	corecmd_search_bin($1)
Chris PeBenito e99359
	can_exec($1,pyzor_exec_t)
Chris PeBenito e99359
')
Chris PeBenito 165b42
Chris PeBenito 165b42
#######################################
Chris PeBenito 165b42
## <summary>
Chris PeBenito 165b42
##	The per user domain template for the pyzor module.
Chris PeBenito 165b42
## </summary>
Chris PeBenito 165b42
## <desc>
Chris PeBenito 165b42
##	

Chris PeBenito 165b42
##	This template allows pyzor to manage files in
Chris PeBenito 165b42
##	a user home directory, creating files with the
Chris PeBenito 165b42
##	correct type.
Chris PeBenito 165b42
##	

Chris PeBenito 165b42
##	

Chris PeBenito 165b42
##	This template is invoked automatically for each user, and
Chris PeBenito 165b42
##	generally does not need to be invoked directly
Chris PeBenito 165b42
##	by policy writers.
Chris PeBenito 165b42
##	

Chris PeBenito 165b42
## </desc>
Chris PeBenito 165b42
## <param name="userdomain_prefix">
Chris PeBenito 165b42
##	<summary>
Chris PeBenito 165b42
##	The prefix of the user domain (e.g., user
Chris PeBenito 165b42
##	is the prefix for user_t).
Chris PeBenito 165b42
##	</summary>
Chris PeBenito 165b42
## </param>
Chris PeBenito 165b42
#
Chris PeBenito 165b42
template(`pyzor_per_userdomain_template',`
Chris PeBenito 165b42
	type $1_pyzor_home_t;
Chris PeBenito 165b42
	userdom_user_home_content($1,$1_pyzor_home_t)
Chris PeBenito 165b42
Chris PeBenito 165b42
	allow pyzord_t $1_pyzor_home_t:dir create_dir_perms;
Chris PeBenito 165b42
	allow pyzord_t $1_pyzor_home_t:file create_file_perms;
Chris PeBenito 165b42
	allow pyzord_t $1_pyzor_home_t:lnk_file create_lnk_perms;
Chris PeBenito 165b42
	userdom_search_user_home_dirs($1,pyzord_t)
Chris PeBenito 165b42
	userdom_user_home_dir_filetrans($1,pyzord_t,$1_pyzor_home_t,{ dir file lnk_file })
Chris PeBenito 165b42
')