2010-05-24 19:32:01 +00:00
|
|
|
policy_module(procmail, 1.12.0)
|
2005-11-15 20:17:18 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
2005-11-29 21:27:15 +00:00
|
|
|
type procmail_t;
|
2005-11-15 20:17:18 +00:00
|
|
|
type procmail_exec_t;
|
2008-07-23 21:38:39 +00:00
|
|
|
application_domain(procmail_t, procmail_exec_t)
|
2005-11-15 20:17:18 +00:00
|
|
|
role system_r types procmail_t;
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
type procmail_home_t;
|
|
|
|
userdom_user_home_content(procmail_home_t)
|
|
|
|
|
2008-11-18 19:55:10 +00:00
|
|
|
type procmail_log_t;
|
|
|
|
logging_log_file(procmail_log_t)
|
|
|
|
|
2007-03-07 21:33:22 +00:00
|
|
|
type procmail_tmp_t;
|
|
|
|
files_tmp_file(procmail_tmp_t)
|
|
|
|
|
2005-11-15 20:17:18 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
2010-05-20 12:17:06 +00:00
|
|
|
allow procmail_t self:capability { sys_nice chown fsetid setuid setgid dac_override };
|
2007-03-07 21:33:22 +00:00
|
|
|
allow procmail_t self:process { setsched signal signull };
|
2006-12-12 20:08:08 +00:00
|
|
|
allow procmail_t self:fifo_file rw_fifo_file_perms;
|
2005-11-15 20:17:18 +00:00
|
|
|
allow procmail_t self:unix_stream_socket create_socket_perms;
|
|
|
|
allow procmail_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow procmail_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
allow procmail_t self:udp_socket create_socket_perms;
|
|
|
|
|
2009-06-26 14:40:13 +00:00
|
|
|
can_exec(procmail_t, procmail_exec_t)
|
2007-09-12 14:53:39 +00:00
|
|
|
|
2008-11-18 19:55:10 +00:00
|
|
|
# Write log to /var/log/procmail.log or /var/log/procmail/.*
|
2010-09-23 07:57:42 +00:00
|
|
|
allow procmail_t procmail_log_t:dir setattr_dir_perms;
|
2008-11-18 19:55:10 +00:00
|
|
|
create_files_pattern(procmail_t, procmail_log_t, procmail_log_t)
|
|
|
|
append_files_pattern(procmail_t, procmail_log_t, procmail_log_t)
|
|
|
|
read_lnk_files_pattern(procmail_t, procmail_log_t, procmail_log_t)
|
|
|
|
logging_log_filetrans(procmail_t, procmail_log_t, { file dir })
|
|
|
|
|
2007-03-07 21:33:22 +00:00
|
|
|
allow procmail_t procmail_tmp_t:file manage_file_perms;
|
|
|
|
files_tmp_filetrans(procmail_t, procmail_tmp_t, file)
|
|
|
|
|
2005-11-15 20:17:18 +00:00
|
|
|
kernel_read_system_state(procmail_t)
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(procmail_t)
|
2005-11-15 20:17:18 +00:00
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled(procmail_t)
|
|
|
|
corenet_all_recvfrom_netlabel(procmail_t)
|
2009-01-06 20:24:10 +00:00
|
|
|
corenet_tcp_sendrecv_generic_if(procmail_t)
|
|
|
|
corenet_udp_sendrecv_generic_if(procmail_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_sendrecv_generic_node(procmail_t)
|
|
|
|
corenet_udp_sendrecv_generic_node(procmail_t)
|
2005-11-15 20:17:18 +00:00
|
|
|
corenet_tcp_sendrecv_all_ports(procmail_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(procmail_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_udp_bind_generic_node(procmail_t)
|
2005-11-29 21:51:24 +00:00
|
|
|
corenet_tcp_connect_spamd_port(procmail_t)
|
2006-05-30 19:46:34 +00:00
|
|
|
corenet_sendrecv_spamd_client_packets(procmail_t)
|
2006-09-13 14:23:04 +00:00
|
|
|
corenet_sendrecv_comsat_client_packets(procmail_t)
|
2005-11-15 20:17:18 +00:00
|
|
|
|
|
|
|
dev_read_urand(procmail_t)
|
|
|
|
|
|
|
|
fs_getattr_xattr_fs(procmail_t)
|
2006-10-31 21:01:48 +00:00
|
|
|
fs_search_auto_mountpoints(procmail_t)
|
2007-11-15 20:10:26 +00:00
|
|
|
fs_rw_anon_inodefs_files(procmail_t)
|
2005-11-15 20:17:18 +00:00
|
|
|
|
|
|
|
auth_use_nsswitch(procmail_t)
|
|
|
|
|
|
|
|
corecmd_exec_bin(procmail_t)
|
|
|
|
corecmd_exec_shell(procmail_t)
|
2008-11-18 19:55:10 +00:00
|
|
|
corecmd_read_bin_symlinks(procmail_t)
|
2005-11-15 20:17:18 +00:00
|
|
|
|
|
|
|
files_read_etc_files(procmail_t)
|
|
|
|
files_read_etc_runtime_files(procmail_t)
|
|
|
|
files_search_pids(procmail_t)
|
|
|
|
# for spamassasin
|
|
|
|
files_read_usr_files(procmail_t)
|
|
|
|
|
2007-11-15 20:10:26 +00:00
|
|
|
logging_send_syslog_msg(procmail_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
logging_append_all_logs(procmail_t)
|
2007-11-15 20:10:26 +00:00
|
|
|
|
2005-11-15 20:17:18 +00:00
|
|
|
miscfiles_read_localization(procmail_t)
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
list_dirs_pattern(procmail_t, procmail_home_t, procmail_home_t)
|
|
|
|
read_files_pattern(procmail_t, procmail_home_t, procmail_home_t)
|
|
|
|
userdom_search_user_home_dirs(procmail_t)
|
|
|
|
userdom_search_admin_dir(procmail_t)
|
|
|
|
|
2005-11-29 21:27:15 +00:00
|
|
|
# only works until we define a different type for maildir
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_manage_user_home_content_dirs(procmail_t)
|
|
|
|
userdom_manage_user_home_content_files(procmail_t)
|
|
|
|
userdom_manage_user_home_content_symlinks(procmail_t)
|
|
|
|
userdom_manage_user_home_content_pipes(procmail_t)
|
|
|
|
userdom_manage_user_home_content_sockets(procmail_t)
|
|
|
|
userdom_user_home_dir_filetrans_user_home_content(procmail_t, { dir file lnk_file fifo_file sock_file })
|
2008-04-29 13:58:34 +00:00
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
# Execute user executables
|
|
|
|
userdom_exec_user_bin_files(procmail_t)
|
2005-11-15 20:17:18 +00:00
|
|
|
|
|
|
|
mta_manage_spool(procmail_t)
|
2010-05-20 12:17:06 +00:00
|
|
|
mta_read_queue(procmail_t)
|
2005-11-15 20:17:18 +00:00
|
|
|
|
|
|
|
ifdef(`hide_broken_symptoms',`
|
|
|
|
mta_dontaudit_rw_queue(procmail_t)
|
|
|
|
')
|
|
|
|
|
2006-12-04 20:10:56 +00:00
|
|
|
tunable_policy(`use_nfs_home_dirs',`
|
|
|
|
fs_manage_nfs_dirs(procmail_t)
|
|
|
|
fs_manage_nfs_files(procmail_t)
|
|
|
|
fs_manage_nfs_symlinks(procmail_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
tunable_policy(`use_samba_home_dirs',`
|
|
|
|
fs_manage_cifs_dirs(procmail_t)
|
|
|
|
fs_manage_cifs_files(procmail_t)
|
|
|
|
fs_manage_cifs_symlinks(procmail_t)
|
|
|
|
')
|
|
|
|
|
2006-06-12 21:36:38 +00:00
|
|
|
optional_policy(`
|
|
|
|
clamav_domtrans_clamscan(procmail_t)
|
2006-06-21 18:25:06 +00:00
|
|
|
clamav_search_lib(procmail_t)
|
2006-06-12 21:36:38 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2007-11-15 20:10:26 +00:00
|
|
|
munin_dontaudit_search_lib(procmail_t)
|
2007-06-21 14:54:34 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-11-15 20:17:18 +00:00
|
|
|
# for a bug in the postfix local program
|
2006-02-02 21:08:12 +00:00
|
|
|
postfix_dontaudit_rw_local_tcp_sockets(procmail_t)
|
2006-03-02 23:41:11 +00:00
|
|
|
postfix_dontaudit_use_fds(procmail_t)
|
2007-09-12 14:53:39 +00:00
|
|
|
postfix_read_spool_files(procmail_t)
|
|
|
|
postfix_read_local_state(procmail_t)
|
|
|
|
postfix_read_master_state(procmail_t)
|
2005-11-15 20:17:18 +00:00
|
|
|
')
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
optional_policy(`
|
|
|
|
nagios_search_spool(procmail_t)
|
|
|
|
')
|
|
|
|
|
2006-05-03 19:58:01 +00:00
|
|
|
optional_policy(`
|
|
|
|
pyzor_domtrans(procmail_t)
|
2008-11-18 19:55:10 +00:00
|
|
|
pyzor_signal(procmail_t)
|
2006-05-03 19:58:01 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-11-15 20:17:18 +00:00
|
|
|
mta_read_config(procmail_t)
|
2006-05-03 19:58:01 +00:00
|
|
|
sendmail_domtrans(procmail_t)
|
2008-11-18 19:55:10 +00:00
|
|
|
sendmail_signal(procmail_t)
|
2010-05-20 12:17:06 +00:00
|
|
|
sendmail_dontaudit_rw_tcp_sockets(procmail_t)
|
|
|
|
sendmail_dontaudit_rw_unix_stream_sockets(procmail_t)
|
2005-11-15 20:17:18 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-11-15 20:17:18 +00:00
|
|
|
corenet_udp_bind_generic_port(procmail_t)
|
2007-06-21 14:54:34 +00:00
|
|
|
corenet_dontaudit_udp_bind_all_ports(procmail_t)
|
2005-11-15 20:17:18 +00:00
|
|
|
|
2008-11-18 19:55:10 +00:00
|
|
|
spamassassin_domtrans_local_client(procmail_t)
|
|
|
|
spamassassin_domtrans_client(procmail_t)
|
2007-03-07 21:33:22 +00:00
|
|
|
spamassassin_read_lib_files(procmail_t)
|
2005-11-15 20:17:18 +00:00
|
|
|
')
|