## policy for dspam ######################################## ## ## Execute a domain transition to run dspam. ## ## ## ## Domain allowed access. ## ## # interface(`dspam_domtrans',` gen_require(` type dspam_t, dspam_exec_t; ') domtrans_pattern($1, dspam_exec_t, dspam_t) ') ######################################## ## ## Execute dspam server in the dspam domain. ## ## ## ## The type of the process performing this action. ## ## # interface(`dspam_initrc_domtrans',` gen_require(` type dspam_initrc_exec_t; ') init_labeled_script_domtrans($1, dspam_initrc_exec_t) ') ######################################## ## ## Allow the specified domain to read dspam's log files. ## ## ## ## Domain allowed access. ## ## ## # interface(`dspam_read_log',` gen_require(` type dspam_log_t; ') logging_search_logs($1) read_files_pattern($1, dspam_log_t, dspam_log_t) ') ######################################## ## ## Allow the specified domain to append ## dspam log files. ## ## ## ## Domain allowed to transition. ## ## # interface(`dspam_append_log',` gen_require(` type dspam_log_t; ') logging_search_logs($1) append_files_pattern($1, dspam_log_t, dspam_log_t) ') ######################################## ## ## Allow domain to manage dspam log files ## ## ## ## Domain to not audit. ## ## # interface(`dspam_manage_log',` gen_require(` type dspam_log_t; ') logging_search_logs($1) manage_dirs_pattern($1, dspam_log_t, dspam_log_t) manage_files_pattern($1, dspam_log_t, dspam_log_t) manage_lnk_files_pattern($1, dspam_log_t, dspam_log_t) ') ######################################## ## ## Search dspam lib directories. ## ## ## ## Domain allowed access. ## ## # interface(`dspam_search_lib',` gen_require(` type dspam_var_lib_t; ') allow $1 dspam_var_lib_t:dir search_dir_perms; files_search_var_lib($1) ') ######################################## ## ## Read dspam lib files. ## ## ## ## Domain allowed access. ## ## # interface(`dspam_read_lib_files',` gen_require(` type dspam_var_lib_t; ') files_search_var_lib($1) read_files_pattern($1, dspam_var_lib_t, dspam_var_lib_t) ') ######################################## ## ## Create, read, write, and delete ## dspam lib files. ## ## ## ## Domain allowed access. ## ## # interface(`dspam_manage_lib_files',` gen_require(` type dspam_var_lib_t; ') files_search_var_lib($1) manage_files_pattern($1, dspam_var_lib_t, dspam_var_lib_t) ') ######################################## ## ## Manage dspam lib dirs files. ## ## ## ## Domain allowed access. ## ## # interface(`dspam_manage_lib_dirs',` gen_require(` type dspam_var_lib_t; ') files_search_var_lib($1) manage_dirs_pattern($1, dspam_var_lib_t, dspam_var_lib_t) ') ######################################## ## ## Read dspam PID files. ## ## ## ## Domain allowed access. ## ## # interface(`dspam_read_pid_files',` gen_require(` type dspam_var_run_t; ') files_search_pids($1) allow $1 dspam_var_run_t:file read_file_perms; ') ####################################### ## ## Connect to DSPAM using a unix domain stream socket. ## ## ## ## Domain allowed access. ## ## # interface(`dspam_stream_connect',` gen_require(` type dspam_t, dspam_var_run_t, dspam_tmp_t; ') files_search_pids($1) files_search_tmp($1) stream_connect_pattern($1, dspam_var_run_t, dspam_var_run_t, dspam_t) stream_connect_pattern($1, dspam_tmp_t, dspam_tmp_t, dspam_t) ') ######################################## ## ## All of the rules required to administrate ## an dspam environment ## ## ## ## Domain allowed access. ## ## ## ## ## Role allowed access. ## ## ## # interface(`dspam_admin',` gen_require(` type dspam_t; type dspam_initrc_exec_t; type dspam_log_t; type dspam_var_lib_t; type dspam_var_run_t; ') allow $1 dspam_t:process signal_perms; ps_process_pattern($1, dspam_t) tunable_policy(`deny_ptrace',`',` allow $1 dspam_t:process ptrace; ') dspam_initrc_domtrans($1) domain_system_change_exemption($1) role_transition $2 dspam_initrc_exec_t system_r; allow $2 system_r; logging_search_logs($1) admin_pattern($1, dspam_log_t) files_search_var_lib($1) admin_pattern($1, dspam_var_lib_t) files_search_pids($1) admin_pattern($1, dspam_var_run_t) ')