|
Chris PeBenito |
17de1b |
## <summary>Pyzor is a distributed, collaborative spam detection and filtering network.</summary>
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
350b6a |
#######################################
|
|
Chris PeBenito |
350b6a |
## <summary>
|
|
Chris PeBenito |
350b6a |
## The per role template for the pyzor module.
|
|
Chris PeBenito |
350b6a |
## </summary>
|
|
Chris PeBenito |
350b6a |
## <desc>
|
|
Chris PeBenito |
350b6a |
##
|
|
Chris PeBenito |
350b6a |
## This template allows pyzor to manage files in
|
|
Chris PeBenito |
350b6a |
## a user home directory, creating files with the
|
|
Chris PeBenito |
350b6a |
## correct type.
|
|
Chris PeBenito |
350b6a |
##
|
|
Chris PeBenito |
350b6a |
##
|
|
Chris PeBenito |
350b6a |
## This template is invoked automatically for each user, and
|
|
Chris PeBenito |
350b6a |
## generally does not need to be invoked directly
|
|
Chris PeBenito |
350b6a |
## by policy writers.
|
|
Chris PeBenito |
350b6a |
##
|
|
Chris PeBenito |
350b6a |
## </desc>
|
|
Chris PeBenito |
350b6a |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
350b6a |
## <summary>
|
|
Chris PeBenito |
350b6a |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
350b6a |
## is the prefix for user_t).
|
|
Chris PeBenito |
350b6a |
## </summary>
|
|
Chris PeBenito |
350b6a |
## </param>
|
|
Chris PeBenito |
350b6a |
#
|
|
Chris PeBenito |
350b6a |
template(`pyzor_per_role_template',`
|
|
Chris PeBenito |
350b6a |
gen_require(`
|
|
Chris PeBenito |
350b6a |
type pyzord_t;
|
|
Chris PeBenito |
350b6a |
')
|
|
Chris PeBenito |
350b6a |
|
|
Chris PeBenito |
350b6a |
type $1_pyzor_home_t;
|
|
Chris PeBenito |
350b6a |
userdom_user_home_content($1, $1_pyzor_home_t)
|
|
Chris PeBenito |
350b6a |
|
|
Chris PeBenito |
350b6a |
manage_dirs_pattern(pyzord_t, $1_pyzor_home_t, $1_pyzor_home_t)
|
|
Chris PeBenito |
350b6a |
manage_files_pattern(pyzord_t, $1_pyzor_home_t, $1_pyzor_home_t)
|
|
Chris PeBenito |
350b6a |
manage_lnk_files_pattern(pyzord_t, $1_pyzor_home_t, $1_pyzor_home_t)
|
|
Chris PeBenito |
350b6a |
userdom_user_home_dir_filetrans($1, pyzord_t, $1_pyzor_home_t, { dir file lnk_file })
|
|
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 |
c0868a |
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 |
17de1b |
can_exec($1,pyzor_exec_t)
|
|
Chris PeBenito |
17de1b |
')
|