Chris PeBenito 17de1b
## <summary>Pyzor is a distributed, collaborative spam detection and filtering network.</summary>
Chris PeBenito 17de1b
Chris PeBenito 296273
########################################
Chris PeBenito 350b6a
## <summary>
Chris PeBenito 296273
##	Role access for pyzor
Chris PeBenito 350b6a
## </summary>
Chris PeBenito 296273
## <param name="role">
Chris PeBenito 296273
##	<summary>
Chris PeBenito 296273
##	Role allowed access
Chris PeBenito 296273
##	</summary>
Chris PeBenito 296273
## </param>
Chris PeBenito 296273
## <param name="domain">
Chris PeBenito 350b6a
##	<summary>
Chris PeBenito 296273
##	User domain for the role
Chris PeBenito 350b6a
##	</summary>
Chris PeBenito 350b6a
## </param>
Chris PeBenito 350b6a
#
Chris PeBenito 296273
interface(`pyzor_role',`
Chris PeBenito 350b6a
	gen_require(`
Chris PeBenito 296273
		type pyzor_t, pyzor_exec_t;
Chris PeBenito 296273
		type pyzor_home_t, pyzor_var_lib_t, pyzor_tmp_t;
Chris PeBenito 350b6a
	')
Chris PeBenito 350b6a
Chris PeBenito 296273
	role $1 types pyzor_t;
Chris PeBenito 296273
Chris PeBenito 296273
	# Transition from the user domain to the derived domain.
Chris PeBenito 296273
	domtrans_pattern($2, pyzor_exec_t, pyzor_t)
Chris PeBenito 350b6a
Chris PeBenito 296273
	# allow ps to show pyzor and allow the user to kill it 
Chris PeBenito 296273
	ps_process_pattern($2, pyzor_t)
Chris PeBenito 296273
	allow $2 pyzor_t:process signal;
Chris PeBenito 350b6a
')
Chris PeBenito 350b6a
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito b5a6c8
##	Send generic signals to pyzor
Chris PeBenito b5a6c8
## </summary>
Chris PeBenito b5a6c8
## <param name="domain">
Chris PeBenito b5a6c8
##	<summary>
Chris PeBenito b5a6c8
##	Domain allowed access.
Chris PeBenito b5a6c8
##	</summary>
Chris PeBenito b5a6c8
## </param>
Chris PeBenito b5a6c8
#
Chris PeBenito b5a6c8
interface(`pyzor_signal',`
Chris PeBenito b5a6c8
	gen_require(`
Chris PeBenito b5a6c8
		type pyzor_t;
Chris PeBenito b5a6c8
	')
Chris PeBenito b5a6c8
Chris PeBenito b5a6c8
	allow $1 pyzor_t:process signal;
Chris PeBenito b5a6c8
')
Chris PeBenito b5a6c8
Chris PeBenito b5a6c8
########################################
Chris PeBenito b5a6c8
## <summary>
Chris PeBenito 17de1b
##	Execute pyzor with a domain transition.
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(`pyzor_domtrans',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type pyzor_exec_t, pyzor_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_usr($1)
Chris PeBenito 17de1b
	corecmd_search_bin($1)
Chris PeBenito 0bfccd
	domtrans_pattern($1, pyzor_exec_t, pyzor_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute pyzor in the caller domain.
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(`pyzor_exec',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type pyzor_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_usr($1)
Chris PeBenito 17de1b
	corecmd_search_bin($1)
Chris PeBenito 0bfccd
	can_exec($1, pyzor_exec_t)
Chris PeBenito 17de1b
')