|
Chris PeBenito |
29af4c |
policy_module(procmail, 1.12.0)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Declarations
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type procmail_t;
|
|
Chris PeBenito |
17de1b |
type procmail_exec_t;
|
|
Chris PeBenito |
0bfccd |
application_domain(procmail_t, procmail_exec_t)
|
|
Chris PeBenito |
17de1b |
role system_r types procmail_t;
|
|
Chris PeBenito |
17de1b |
|
|
Dan Walsh |
3eaa99 |
type procmail_home_t;
|
|
Dan Walsh |
3eaa99 |
userdom_user_home_content(procmail_home_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Chris PeBenito |
01e9e7 |
type procmail_log_t;
|
|
Chris PeBenito |
01e9e7 |
logging_log_file(procmail_log_t)
|
|
Chris PeBenito |
01e9e7 |
|
|
Chris PeBenito |
59bedc |
type procmail_tmp_t;
|
|
Chris PeBenito |
59bedc |
files_tmp_file(procmail_tmp_t)
|
|
Chris PeBenito |
59bedc |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Local policy
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
b276e3 |
allow procmail_t self:capability { sys_nice chown fsetid setuid setgid dac_override };
|
|
Chris PeBenito |
59bedc |
allow procmail_t self:process { setsched signal signull };
|
|
Chris PeBenito |
c0868a |
allow procmail_t self:fifo_file rw_fifo_file_perms;
|
|
Chris PeBenito |
17de1b |
allow procmail_t self:unix_stream_socket create_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow procmail_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow procmail_t self:tcp_socket create_stream_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow procmail_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
3f67f7 |
can_exec(procmail_t, procmail_exec_t)
|
|
Chris PeBenito |
14add3 |
|
|
Chris PeBenito |
01e9e7 |
# Write log to /var/log/procmail.log or /var/log/procmail/.*
|
|
Chris PeBenito |
01e9e7 |
allow procmail_t procmail_log_t:dir setattr;
|
|
Chris PeBenito |
01e9e7 |
create_files_pattern(procmail_t, procmail_log_t, procmail_log_t)
|
|
Chris PeBenito |
01e9e7 |
append_files_pattern(procmail_t, procmail_log_t, procmail_log_t)
|
|
Chris PeBenito |
01e9e7 |
read_lnk_files_pattern(procmail_t, procmail_log_t, procmail_log_t)
|
|
Chris PeBenito |
01e9e7 |
logging_log_filetrans(procmail_t, procmail_log_t, { file dir })
|
|
Chris PeBenito |
01e9e7 |
|
|
Chris PeBenito |
59bedc |
allow procmail_t procmail_tmp_t:file manage_file_perms;
|
|
Chris PeBenito |
59bedc |
files_tmp_filetrans(procmail_t, procmail_tmp_t, file)
|
|
Chris PeBenito |
59bedc |
|
|
Chris PeBenito |
17de1b |
kernel_read_system_state(procmail_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_kernel_sysctls(procmail_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
190066 |
corenet_all_recvfrom_unlabeled(procmail_t)
|
|
Chris PeBenito |
190066 |
corenet_all_recvfrom_netlabel(procmail_t)
|
|
Chris PeBenito |
668b30 |
corenet_tcp_sendrecv_generic_if(procmail_t)
|
|
Chris PeBenito |
668b30 |
corenet_udp_sendrecv_generic_if(procmail_t)
|
|
Chris PeBenito |
c12621 |
corenet_tcp_sendrecv_generic_node(procmail_t)
|
|
Chris PeBenito |
c12621 |
corenet_udp_sendrecv_generic_node(procmail_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_all_ports(procmail_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_all_ports(procmail_t)
|
|
Chris PeBenito |
c12621 |
corenet_udp_bind_generic_node(procmail_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_connect_spamd_port(procmail_t)
|
|
Chris PeBenito |
17de1b |
corenet_sendrecv_spamd_client_packets(procmail_t)
|
|
Chris PeBenito |
0d96ff |
corenet_sendrecv_comsat_client_packets(procmail_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
dev_read_urand(procmail_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
fs_getattr_xattr_fs(procmail_t)
|
|
Chris PeBenito |
d9845a |
fs_search_auto_mountpoints(procmail_t)
|
|
Chris PeBenito |
226c06 |
fs_rw_anon_inodefs_files(procmail_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
auth_use_nsswitch(procmail_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
corecmd_exec_bin(procmail_t)
|
|
Chris PeBenito |
17de1b |
corecmd_exec_shell(procmail_t)
|
|
Chris PeBenito |
01e9e7 |
corecmd_read_bin_symlinks(procmail_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
files_read_etc_files(procmail_t)
|
|
Chris PeBenito |
17de1b |
files_read_etc_runtime_files(procmail_t)
|
|
Chris PeBenito |
17de1b |
files_search_pids(procmail_t)
|
|
Chris PeBenito |
17de1b |
# for spamassasin
|
|
Chris PeBenito |
17de1b |
files_read_usr_files(procmail_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
226c06 |
logging_send_syslog_msg(procmail_t)
|
|
Dan Walsh |
3eaa99 |
logging_append_all_logs(procmail_t)
|
|
Chris PeBenito |
226c06 |
|
|
Chris PeBenito |
17de1b |
miscfiles_read_localization(procmail_t)
|
|
Chris PeBenito |
17de1b |
|
|
Dan Walsh |
3eaa99 |
list_dirs_pattern(procmail_t, procmail_home_t, procmail_home_t)
|
|
Dan Walsh |
3eaa99 |
read_files_pattern(procmail_t, procmail_home_t, procmail_home_t)
|
|
Dan Walsh |
3eaa99 |
userdom_search_user_home_dirs(procmail_t)
|
|
Dan Walsh |
3eaa99 |
userdom_search_admin_dir(procmail_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Chris PeBenito |
17de1b |
# only works until we define a different type for maildir
|
|
Chris PeBenito |
296273 |
userdom_manage_user_home_content_dirs(procmail_t)
|
|
Chris PeBenito |
296273 |
userdom_manage_user_home_content_files(procmail_t)
|
|
Chris PeBenito |
296273 |
userdom_manage_user_home_content_symlinks(procmail_t)
|
|
Chris PeBenito |
296273 |
userdom_manage_user_home_content_pipes(procmail_t)
|
|
Chris PeBenito |
296273 |
userdom_manage_user_home_content_sockets(procmail_t)
|
|
Chris PeBenito |
296273 |
userdom_user_home_dir_filetrans_user_home_content(procmail_t, { dir file lnk_file fifo_file sock_file })
|
|
Chris PeBenito |
e9c6cd |
|
|
Dan Walsh |
3eaa99 |
# Execute user executables
|
|
Dan Walsh |
3eaa99 |
userdom_exec_user_bin_files(procmail_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
mta_manage_spool(procmail_t)
|
|
Chris PeBenito |
b276e3 |
mta_read_queue(procmail_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
ifdef(`hide_broken_symptoms',`
|
|
Chris PeBenito |
17de1b |
mta_dontaudit_rw_queue(procmail_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
d6d16b |
tunable_policy(`use_nfs_home_dirs',`
|
|
Chris PeBenito |
d6d16b |
fs_manage_nfs_dirs(procmail_t)
|
|
Chris PeBenito |
d6d16b |
fs_manage_nfs_files(procmail_t)
|
|
Chris PeBenito |
d6d16b |
fs_manage_nfs_symlinks(procmail_t)
|
|
Chris PeBenito |
d6d16b |
')
|
|
Chris PeBenito |
d6d16b |
|
|
Chris PeBenito |
d6d16b |
tunable_policy(`use_samba_home_dirs',`
|
|
Chris PeBenito |
d6d16b |
fs_manage_cifs_dirs(procmail_t)
|
|
Chris PeBenito |
d6d16b |
fs_manage_cifs_files(procmail_t)
|
|
Chris PeBenito |
d6d16b |
fs_manage_cifs_symlinks(procmail_t)
|
|
Chris PeBenito |
d6d16b |
')
|
|
Chris PeBenito |
d6d16b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
clamav_domtrans_clamscan(procmail_t)
|
|
Chris PeBenito |
17de1b |
clamav_search_lib(procmail_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
226c06 |
munin_dontaudit_search_lib(procmail_t)
|
|
Chris PeBenito |
a90a25 |
')
|
|
Chris PeBenito |
a90a25 |
|
|
Chris PeBenito |
a90a25 |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
# for a bug in the postfix local program
|
|
Chris PeBenito |
17de1b |
postfix_dontaudit_rw_local_tcp_sockets(procmail_t)
|
|
Chris PeBenito |
17de1b |
postfix_dontaudit_use_fds(procmail_t)
|
|
Chris PeBenito |
14add3 |
postfix_read_spool_files(procmail_t)
|
|
Chris PeBenito |
14add3 |
postfix_read_local_state(procmail_t)
|
|
Chris PeBenito |
14add3 |
postfix_read_master_state(procmail_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
nagios_search_spool(procmail_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
pyzor_domtrans(procmail_t)
|
|
Chris PeBenito |
01e9e7 |
pyzor_signal(procmail_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
mta_read_config(procmail_t)
|
|
Chris PeBenito |
17de1b |
sendmail_domtrans(procmail_t)
|
|
Chris PeBenito |
01e9e7 |
sendmail_signal(procmail_t)
|
|
Chris PeBenito |
b276e3 |
sendmail_dontaudit_rw_tcp_sockets(procmail_t)
|
|
Chris PeBenito |
b276e3 |
sendmail_dontaudit_rw_unix_stream_sockets(procmail_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
corenet_udp_bind_generic_port(procmail_t)
|
|
Chris PeBenito |
a90a25 |
corenet_dontaudit_udp_bind_all_ports(procmail_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
01e9e7 |
spamassassin_domtrans_local_client(procmail_t)
|
|
Chris PeBenito |
01e9e7 |
spamassassin_domtrans_client(procmail_t)
|
|
Chris PeBenito |
59bedc |
spamassassin_read_lib_files(procmail_t)
|
|
Chris PeBenito |
17de1b |
')
|