|
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>
|
|
Dominick Grift |
288845 |
## Domain allowed to transition.
|
|
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 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## All of the rules required to administrate
|
|
Dan Walsh |
3eaa99 |
## an pyzor environment
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
## <param name="role">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## The role to be allowed to manage the pyzor domain.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
## <rolecap/>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`pyzor_admin',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
type pyzord_t, pyzor_tmp_t, pyzord_log_t;
|
|
Dan Walsh |
3eaa99 |
type pyzor_etc_t, pyzor_var_lib_t;
|
|
Dan Walsh |
3eaa99 |
type pyzord_initrc_exec_t;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
allow $1 pyzord_t:process { ptrace signal_perms };
|
|
Dan Walsh |
3eaa99 |
ps_process_pattern($1, pyzord_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
init_labeled_script_domtrans($1, pyzord_initrc_exec_t)
|
|
Dan Walsh |
3eaa99 |
domain_system_change_exemption($1)
|
|
Dan Walsh |
3eaa99 |
role_transition $2 pyzord_initrc_exec_t system_r;
|
|
Dan Walsh |
3eaa99 |
allow $2 system_r;
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
files_list_tmp($1)
|
|
Dan Walsh |
3eaa99 |
admin_pattern($1, pyzor_tmp_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
logging_list_logs($1)
|
|
Dan Walsh |
3eaa99 |
admin_pattern($1, pyzord_log_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
files_list_etc($1)
|
|
Dan Walsh |
3eaa99 |
admin_pattern($1, pyzor_etc_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
files_list_var_lib($1)
|
|
Dan Walsh |
3eaa99 |
admin_pattern($1, pyzor_var_lib_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
|