|
Chris PeBenito |
6bf8bf |
## <summary>Exim mail transfer agent</summary>
|
|
Chris PeBenito |
6bf8bf |
|
|
Chris PeBenito |
6bf8bf |
########################################
|
|
Chris PeBenito |
6bf8bf |
## <summary>
|
|
Chris PeBenito |
6bf8bf |
## Execute a domain transition to run exim.
|
|
Chris PeBenito |
6bf8bf |
## </summary>
|
|
Chris PeBenito |
6bf8bf |
## <param name="domain">
|
|
Dominick Grift |
4b1644 |
## <summary>
|
|
Chris PeBenito |
6bf8bf |
## Domain allowed to transition.
|
|
Dominick Grift |
4b1644 |
## </summary>
|
|
Chris PeBenito |
6bf8bf |
## </param>
|
|
Chris PeBenito |
6bf8bf |
#
|
|
Chris PeBenito |
6bf8bf |
interface(`exim_domtrans',`
|
|
Chris PeBenito |
6bf8bf |
gen_require(`
|
|
Chris PeBenito |
6bf8bf |
type exim_t, exim_exec_t;
|
|
Chris PeBenito |
6bf8bf |
')
|
|
Chris PeBenito |
6bf8bf |
|
|
Chris PeBenito |
6bf8bf |
domtrans_pattern($1, exim_exec_t, exim_t)
|
|
Chris PeBenito |
6bf8bf |
')
|
|
Chris PeBenito |
6bf8bf |
|
|
Chris PeBenito |
6bf8bf |
########################################
|
|
Chris PeBenito |
6bf8bf |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Execute exim in the exim domain.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dominick Grift |
3c484f |
## Domain allowed to transition.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dominick Grift |
4b1644 |
interface(`exim_initrc_domtrans',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
type exim_initrc_exec_t;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
init_labeled_script_domtrans($1, exim_initrc_exec_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Chris PeBenito |
6bf8bf |
## Do not audit attempts to read,
|
|
Chris PeBenito |
6bf8bf |
## exim tmp files
|
|
Chris PeBenito |
6bf8bf |
## </summary>
|
|
Chris PeBenito |
6bf8bf |
## <param name="domain">
|
|
Chris PeBenito |
6bf8bf |
## <summary>
|
|
Chris PeBenito |
6bf8bf |
## Domain to not audit.
|
|
Chris PeBenito |
6bf8bf |
## </summary>
|
|
Chris PeBenito |
6bf8bf |
## </param>
|
|
Chris PeBenito |
6bf8bf |
#
|
|
Chris PeBenito |
6bf8bf |
interface(`exim_dontaudit_read_tmp_files',`
|
|
Chris PeBenito |
6bf8bf |
gen_require(`
|
|
Chris PeBenito |
6bf8bf |
type exim_tmp_t;
|
|
Chris PeBenito |
6bf8bf |
')
|
|
Chris PeBenito |
6bf8bf |
|
|
Chris PeBenito |
6bf8bf |
dontaudit $1 exim_tmp_t:file read_file_perms;
|
|
Chris PeBenito |
6bf8bf |
')
|
|
Chris PeBenito |
6bf8bf |
|
|
Chris PeBenito |
6bf8bf |
########################################
|
|
Chris PeBenito |
6bf8bf |
## <summary>
|
|
Chris PeBenito |
6bf8bf |
## Allow domain to read, exim tmp files
|
|
Chris PeBenito |
6bf8bf |
## </summary>
|
|
Chris PeBenito |
6bf8bf |
## <param name="domain">
|
|
Chris PeBenito |
6bf8bf |
## <summary>
|
|
Dominick Grift |
288845 |
## Domain allowed access.
|
|
Chris PeBenito |
6bf8bf |
## </summary>
|
|
Chris PeBenito |
6bf8bf |
## </param>
|
|
Chris PeBenito |
6bf8bf |
#
|
|
Chris PeBenito |
6bf8bf |
interface(`exim_read_tmp_files',`
|
|
Chris PeBenito |
6bf8bf |
gen_require(`
|
|
Chris PeBenito |
6bf8bf |
type exim_tmp_t;
|
|
Chris PeBenito |
6bf8bf |
')
|
|
Chris PeBenito |
6bf8bf |
|
|
Chris PeBenito |
6bf8bf |
allow $1 exim_tmp_t:file read_file_perms;
|
|
Chris PeBenito |
6bf8bf |
files_search_tmp($1)
|
|
Chris PeBenito |
6bf8bf |
')
|
|
Chris PeBenito |
6bf8bf |
|
|
Chris PeBenito |
6bf8bf |
########################################
|
|
Chris PeBenito |
6bf8bf |
## <summary>
|
|
Chris PeBenito |
6bf8bf |
## Read exim PID files.
|
|
Chris PeBenito |
6bf8bf |
## </summary>
|
|
Chris PeBenito |
6bf8bf |
## <param name="domain">
|
|
Chris PeBenito |
6bf8bf |
## <summary>
|
|
Chris PeBenito |
6bf8bf |
## Domain allowed access.
|
|
Chris PeBenito |
6bf8bf |
## </summary>
|
|
Chris PeBenito |
6bf8bf |
## </param>
|
|
Chris PeBenito |
6bf8bf |
#
|
|
Chris PeBenito |
6bf8bf |
interface(`exim_read_pid_files',`
|
|
Chris PeBenito |
6bf8bf |
gen_require(`
|
|
Chris PeBenito |
6bf8bf |
type exim_var_run_t;
|
|
Chris PeBenito |
6bf8bf |
')
|
|
Chris PeBenito |
6bf8bf |
|
|
Chris PeBenito |
6bf8bf |
allow $1 exim_var_run_t:file read_file_perms;
|
|
Chris PeBenito |
6bf8bf |
files_search_pids($1)
|
|
Chris PeBenito |
6bf8bf |
')
|
|
Chris PeBenito |
6bf8bf |
|
|
Chris PeBenito |
6bf8bf |
########################################
|
|
Chris PeBenito |
6bf8bf |
## <summary>
|
|
Chris PeBenito |
6bf8bf |
## Allow the specified domain to read exim's log files.
|
|
Chris PeBenito |
6bf8bf |
## </summary>
|
|
Chris PeBenito |
6bf8bf |
## <param name="domain">
|
|
Chris PeBenito |
6bf8bf |
## <summary>
|
|
Chris PeBenito |
6bf8bf |
## Domain allowed access.
|
|
Chris PeBenito |
6bf8bf |
## </summary>
|
|
Chris PeBenito |
6bf8bf |
## </param>
|
|
Chris PeBenito |
6bf8bf |
## <rolecap/>
|
|
Chris PeBenito |
6bf8bf |
#
|
|
Chris PeBenito |
6bf8bf |
interface(`exim_read_log',`
|
|
Chris PeBenito |
6bf8bf |
gen_require(`
|
|
Chris PeBenito |
6bf8bf |
type exim_log_t;
|
|
Chris PeBenito |
6bf8bf |
')
|
|
Chris PeBenito |
6bf8bf |
|
|
Chris PeBenito |
6bf8bf |
read_files_pattern($1, exim_log_t, exim_log_t)
|
|
Chris PeBenito |
6bf8bf |
logging_search_logs($1)
|
|
Chris PeBenito |
6bf8bf |
')
|
|
Chris PeBenito |
6bf8bf |
|
|
Chris PeBenito |
6bf8bf |
########################################
|
|
Chris PeBenito |
6bf8bf |
## <summary>
|
|
Chris PeBenito |
6bf8bf |
## Allow the specified domain to append
|
|
Chris PeBenito |
6bf8bf |
## exim log files.
|
|
Chris PeBenito |
6bf8bf |
## </summary>
|
|
Chris PeBenito |
6bf8bf |
## <param name="domain">
|
|
Dominick Grift |
4b1644 |
## <summary>
|
|
Dominick Grift |
288845 |
## Domain allowed access.
|
|
Dominick Grift |
4b1644 |
## </summary>
|
|
Chris PeBenito |
6bf8bf |
## </param>
|
|
Chris PeBenito |
6bf8bf |
#
|
|
Chris PeBenito |
6bf8bf |
interface(`exim_append_log',`
|
|
Chris PeBenito |
6bf8bf |
gen_require(`
|
|
Chris PeBenito |
6bf8bf |
type exim_log_t;
|
|
Chris PeBenito |
6bf8bf |
')
|
|
Chris PeBenito |
6bf8bf |
|
|
Chris PeBenito |
6bf8bf |
append_files_pattern($1, exim_log_t, exim_log_t)
|
|
Chris PeBenito |
6bf8bf |
logging_search_logs($1)
|
|
Chris PeBenito |
6bf8bf |
')
|
|
Chris PeBenito |
6bf8bf |
|
|
Chris PeBenito |
6bf8bf |
########################################
|
|
Chris PeBenito |
6bf8bf |
## <summary>
|
|
Chris PeBenito |
80348b |
## Allow the specified domain to manage exim's log files.
|
|
Chris PeBenito |
80348b |
## </summary>
|
|
Chris PeBenito |
80348b |
## <param name="domain">
|
|
Chris PeBenito |
80348b |
## <summary>
|
|
Chris PeBenito |
80348b |
## Domain allowed access.
|
|
Chris PeBenito |
80348b |
## </summary>
|
|
Chris PeBenito |
80348b |
## </param>
|
|
Chris PeBenito |
80348b |
## <rolecap/>
|
|
Chris PeBenito |
80348b |
#
|
|
Chris PeBenito |
80348b |
interface(`exim_manage_log',`
|
|
Chris PeBenito |
80348b |
gen_require(`
|
|
Chris PeBenito |
80348b |
type exim_log_t;
|
|
Chris PeBenito |
80348b |
')
|
|
Chris PeBenito |
80348b |
|
|
Chris PeBenito |
80348b |
manage_files_pattern($1, exim_log_t, exim_log_t)
|
|
Chris PeBenito |
80348b |
logging_search_logs($1)
|
|
Chris PeBenito |
80348b |
')
|
|
Chris PeBenito |
80348b |
|
|
Chris PeBenito |
80348b |
########################################
|
|
Chris PeBenito |
80348b |
## <summary>
|
|
Chris PeBenito |
80348b |
## Create, read, write, and delete
|
|
Chris PeBenito |
80348b |
## exim spool dirs.
|
|
Chris PeBenito |
80348b |
## </summary>
|
|
Chris PeBenito |
80348b |
## <param name="domain">
|
|
Chris PeBenito |
80348b |
## <summary>
|
|
Chris PeBenito |
80348b |
## Domain allowed access.
|
|
Chris PeBenito |
80348b |
## </summary>
|
|
Chris PeBenito |
80348b |
## </param>
|
|
Chris PeBenito |
80348b |
#
|
|
Chris PeBenito |
80348b |
interface(`exim_manage_spool_dirs',`
|
|
Chris PeBenito |
80348b |
gen_require(`
|
|
Chris PeBenito |
80348b |
type exim_spool_t;
|
|
Chris PeBenito |
80348b |
')
|
|
Chris PeBenito |
80348b |
|
|
Chris PeBenito |
80348b |
manage_dirs_pattern($1, exim_spool_t, exim_spool_t)
|
|
Chris PeBenito |
80348b |
files_search_spool($1)
|
|
Chris PeBenito |
80348b |
')
|
|
Chris PeBenito |
80348b |
|
|
Chris PeBenito |
80348b |
########################################
|
|
Chris PeBenito |
80348b |
## <summary>
|
|
Chris PeBenito |
6bf8bf |
## Read exim spool files.
|
|
Chris PeBenito |
6bf8bf |
## </summary>
|
|
Chris PeBenito |
6bf8bf |
## <param name="domain">
|
|
Chris PeBenito |
6bf8bf |
## <summary>
|
|
Chris PeBenito |
6bf8bf |
## Domain allowed access.
|
|
Chris PeBenito |
6bf8bf |
## </summary>
|
|
Chris PeBenito |
6bf8bf |
## </param>
|
|
Chris PeBenito |
6bf8bf |
#
|
|
Chris PeBenito |
6bf8bf |
interface(`exim_read_spool_files',`
|
|
Chris PeBenito |
6bf8bf |
gen_require(`
|
|
Chris PeBenito |
6bf8bf |
type exim_spool_t;
|
|
Chris PeBenito |
6bf8bf |
')
|
|
Chris PeBenito |
6bf8bf |
|
|
Chris PeBenito |
6bf8bf |
allow $1 exim_spool_t:file read_file_perms;
|
|
Chris PeBenito |
6bf8bf |
allow $1 exim_spool_t:dir list_dir_perms;
|
|
Chris PeBenito |
6bf8bf |
files_search_spool($1)
|
|
Chris PeBenito |
6bf8bf |
')
|
|
Chris PeBenito |
6bf8bf |
|
|
Chris PeBenito |
6bf8bf |
########################################
|
|
Chris PeBenito |
6bf8bf |
## <summary>
|
|
Chris PeBenito |
6bf8bf |
## Create, read, write, and delete
|
|
Chris PeBenito |
6bf8bf |
## exim spool files.
|
|
Chris PeBenito |
6bf8bf |
## </summary>
|
|
Chris PeBenito |
6bf8bf |
## <param name="domain">
|
|
Chris PeBenito |
6bf8bf |
## <summary>
|
|
Chris PeBenito |
6bf8bf |
## Domain allowed access.
|
|
Chris PeBenito |
6bf8bf |
## </summary>
|
|
Chris PeBenito |
6bf8bf |
## </param>
|
|
Chris PeBenito |
6bf8bf |
#
|
|
Chris PeBenito |
6bf8bf |
interface(`exim_manage_spool_files',`
|
|
Chris PeBenito |
6bf8bf |
gen_require(`
|
|
Chris PeBenito |
6bf8bf |
type exim_spool_t;
|
|
Chris PeBenito |
6bf8bf |
')
|
|
Chris PeBenito |
6bf8bf |
|
|
Chris PeBenito |
6bf8bf |
manage_files_pattern($1, exim_spool_t, exim_spool_t)
|
|
Chris PeBenito |
6bf8bf |
files_search_spool($1)
|
|
Chris PeBenito |
6bf8bf |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## All of the rules required to administrate
|
|
Dan Walsh |
3eaa99 |
## an exim 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 |
## Role allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dominick Grift |
4b1644 |
interface(`exim_admin',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dominick Grift |
4b1644 |
type exim_t, exim_initrc_exec_t, exim_log_t;
|
|
Dominick Grift |
4b1644 |
type exim_tmp_t, exim_spool_t, exim_var_run_t;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dominick Grift |
39e118 |
allow $1 exim_t:process { ptrace signal_perms };
|
|
Dominick Grift |
39e118 |
ps_process_pattern($1, exim_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
exim_initrc_domtrans($1)
|
|
Dan Walsh |
3eaa99 |
domain_system_change_exemption($1)
|
|
Dan Walsh |
3eaa99 |
role_transition $2 exim_initrc_exec_t system_r;
|
|
Dan Walsh |
3eaa99 |
allow $2 system_r;
|
|
Dan Walsh |
3eaa99 |
|
|
Dominick Grift |
61f406 |
logging_list_logs($1)
|
|
Dan Walsh |
3eaa99 |
admin_pattern($1, exim_log_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dominick Grift |
61f406 |
files_list_tmp($1)
|
|
Dan Walsh |
3eaa99 |
admin_pattern($1, exim_tmp_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dominick Grift |
61f406 |
files_list_spool($1)
|
|
Dan Walsh |
3eaa99 |
admin_pattern($1, exim_spool_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dominick Grift |
61f406 |
files_list_pids($1)
|
|
Dan Walsh |
3eaa99 |
admin_pattern($1, exim_var_run_t)
|
|
Dan Walsh |
3eaa99 |
')
|