89 lines
2.3 KiB
Plaintext
89 lines
2.3 KiB
Plaintext
policy_module(dspam, 1.5.0)
|
|
|
|
########################################
|
|
#
|
|
# Declarations
|
|
#
|
|
|
|
type dspam_t;
|
|
type dspam_exec_t;
|
|
init_daemon_domain(dspam_t, dspam_exec_t)
|
|
|
|
type dspam_initrc_exec_t;
|
|
init_script_file(dspam_initrc_exec_t)
|
|
|
|
type dspam_log_t;
|
|
logging_log_file(dspam_log_t)
|
|
|
|
type dspam_runtime_t alias dspam_var_run_t;
|
|
files_pid_file(dspam_runtime_t)
|
|
|
|
type dspam_var_lib_t;
|
|
files_type(dspam_var_lib_t)
|
|
|
|
########################################
|
|
#
|
|
# Local policy
|
|
#
|
|
|
|
allow dspam_t self:capability net_admin;
|
|
allow dspam_t self:process signal;
|
|
allow dspam_t self:fifo_file rw_fifo_file_perms;
|
|
allow dspam_t self:unix_stream_socket { accept listen };
|
|
|
|
manage_dirs_pattern(dspam_t, dspam_log_t, dspam_log_t)
|
|
append_files_pattern(dspam_t, dspam_log_t, dspam_log_t)
|
|
create_files_pattern(dspam_t, dspam_log_t, dspam_log_t)
|
|
setattr_files_pattern(dspam_t, dspam_log_t, dspam_log_t)
|
|
logging_log_filetrans(dspam_t, dspam_log_t, dir)
|
|
|
|
manage_dirs_pattern(dspam_t, dspam_var_lib_t, dspam_var_lib_t)
|
|
manage_files_pattern(dspam_t, dspam_var_lib_t, dspam_var_lib_t)
|
|
files_var_lib_filetrans(dspam_t, dspam_var_lib_t, dir)
|
|
|
|
manage_dirs_pattern(dspam_t, dspam_runtime_t, dspam_runtime_t)
|
|
manage_files_pattern(dspam_t, dspam_runtime_t, dspam_runtime_t)
|
|
manage_sock_files_pattern(dspam_t, dspam_runtime_t, dspam_runtime_t)
|
|
files_pid_filetrans(dspam_t, dspam_runtime_t, dir)
|
|
|
|
corenet_all_recvfrom_unlabeled(dspam_t)
|
|
corenet_all_recvfrom_netlabel(dspam_t)
|
|
corenet_tcp_sendrecv_generic_if(dspam_t)
|
|
corenet_tcp_sendrecv_generic_node(dspam_t)
|
|
corenet_tcp_bind_generic_node(dspam_t)
|
|
|
|
corenet_sendrecv_spamd_client_packets(dspam_t)
|
|
corenet_sendrecv_spamd_server_packets(dspam_t)
|
|
corenet_tcp_bind_spamd_port(dspam_t)
|
|
corenet_tcp_connect_spamd_port(dspam_t)
|
|
|
|
files_search_spool(dspam_t)
|
|
|
|
auth_use_nsswitch(dspam_t)
|
|
|
|
logging_send_syslog_msg(dspam_t)
|
|
|
|
miscfiles_read_localization(dspam_t)
|
|
|
|
optional_policy(`
|
|
apache_content_template(dspam)
|
|
|
|
list_dirs_pattern(dspam_t, httpd_dspam_content_t, httpd_dspam_content_t)
|
|
manage_dirs_pattern(dspam_t, httpd_dspam_rw_content_t, httpd_dspam_rw_content_t)
|
|
manage_files_pattern(dspam_t, httpd_dspam_rw_content_t, httpd_dspam_rw_content_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
mysql_stream_connect(dspam_t)
|
|
mysql_read_config(dspam_t)
|
|
|
|
mysql_tcp_connect(dspam_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
postgresql_stream_connect(dspam_t)
|
|
postgresql_unpriv_client(dspam_t)
|
|
|
|
postgresql_tcp_connect(dspam_t)
|
|
')
|