|
Chris PeBenito |
f932d8 |
## <summary>Filter used for removing unsolicited email.</summary>
|
|
Chris PeBenito |
f932d8 |
|
|
Chris PeBenito |
6820a3 |
#######################################
|
|
Chris PeBenito |
6820a3 |
## <summary>
|
|
Chris PeBenito |
6820a3 |
## The per user domain template for the spamassassin module.
|
|
Chris PeBenito |
6820a3 |
## </summary>
|
|
Chris PeBenito |
6820a3 |
## <desc>
|
|
Chris PeBenito |
6820a3 |
##
|
|
Chris PeBenito |
6820a3 |
## The per user domain template for the spamassassin module.
|
|
Chris PeBenito |
6820a3 |
##
|
|
Chris PeBenito |
6820a3 |
##
|
|
Chris PeBenito |
6820a3 |
## This template is invoked automatically for each user, and
|
|
Chris PeBenito |
6820a3 |
## generally does not need to be invoked directly
|
|
Chris PeBenito |
6820a3 |
## by policy writers.
|
|
Chris PeBenito |
6820a3 |
##
|
|
Chris PeBenito |
6820a3 |
## </desc>
|
|
Chris PeBenito |
6820a3 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
6820a3 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
6820a3 |
## is the prefix for user_t).
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
6820a3 |
## </param>
|
|
Chris PeBenito |
6820a3 |
## <param name="user_domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
6820a3 |
## The type of the user domain.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
6820a3 |
## </param>
|
|
Chris PeBenito |
6820a3 |
## <param name="user_role">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
6820a3 |
## The role associated with the user domain.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
6820a3 |
## </param>
|
|
Chris PeBenito |
6820a3 |
#
|
|
Chris PeBenito |
6820a3 |
# cjp: when tunables are available, spamc stuff should be
|
|
Chris PeBenito |
6820a3 |
# toggled on activation of spamc, and similarly for spamd.
|
|
Chris PeBenito |
6820a3 |
template(`spamassassin_per_userdomain_template',`
|
|
Chris PeBenito |
9417cb |
|
|
Chris PeBenito |
9417cb |
##############################
|
|
Chris PeBenito |
9417cb |
#
|
|
Chris PeBenito |
9417cb |
# Declarations
|
|
Chris PeBenito |
9417cb |
#
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
type $1_spamc_t;
|
|
Chris PeBenito |
6820a3 |
domain_type($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
domain_entry_file($1_spamc_t,spamc_exec_t)
|
|
Chris PeBenito |
6820a3 |
role $3 types $1_spamc_t;
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
type $1_spamc_tmp_t;
|
|
Chris PeBenito |
6820a3 |
files_tmp_file($1_spamc_tmp_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
type $1_spamassassin_t;
|
|
Chris PeBenito |
6820a3 |
domain_type($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
domain_entry_file($1_spamassassin_t,spamassassin_exec_t)
|
|
Chris PeBenito |
6820a3 |
role $3 types $1_spamassassin_t;
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
type $1_spamassassin_home_t alias $1_spamassassin_rw_t;
|
|
Chris PeBenito |
6820a3 |
userdom_home_file($1,$1_spamassassin_home_t)
|
|
Chris PeBenito |
6820a3 |
files_poly_member($1_spamassassin_home_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
type $1_spamassassin_tmp_t;
|
|
Chris PeBenito |
6820a3 |
files_tmp_file($1_spamassassin_tmp_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
##############################
|
|
Chris PeBenito |
6820a3 |
#
|
|
Chris PeBenito |
6820a3 |
# $1_spamc_t local policy
|
|
Chris PeBenito |
6820a3 |
#
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
allow $1_spamc_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap };
|
|
Chris PeBenito |
6820a3 |
allow $1_spamc_t self:fd use;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamc_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamc_t self:sock_file r_file_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamc_t self:shm create_shm_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamc_t self:sem create_sem_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamc_t self:msgq create_msgq_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamc_t self:msg { send receive };
|
|
Chris PeBenito |
6820a3 |
allow $1_spamc_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamc_t self:unix_stream_socket create_stream_socket_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamc_t self:unix_dgram_socket sendto;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamc_t self:unix_stream_socket connectto;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamc_t self:tcp_socket create_stream_socket_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamc_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
allow $1_spamc_t $1_spamc_tmp_t:dir create_dir_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamc_t $1_spamc_tmp_t:file create_file_perms;
|
|
Chris PeBenito |
9d5949 |
files_filetrans_tmp($1_spamc_t, $1_spamc_tmp_t, { file dir })
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
# Allow connecting to a local spamd
|
|
Chris PeBenito |
6820a3 |
allow $1_spamc_t spamd_t:tcp_socket { connectto recvfrom };
|
|
Chris PeBenito |
6820a3 |
allow spamd_t $1_spamc_t:tcp_socket { acceptfrom recvfrom };
|
|
Chris PeBenito |
6820a3 |
allow $1_spamc_t spamd_t:unix_stream_socket connectto;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamc_t spamd_tmp_t:sock_file rw_file_perms;
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
domain_auto_trans($2, spamc_exec_t, $1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
allow $2 $1_spamc_t:fd use;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamc_t $2:fd use;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamc_t $2:fifo_file rw_file_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamc_t $2:process sigchld;
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
445522 |
kernel_read_kernel_sysctls($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
kernel_tcp_recvfrom($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
corenet_tcp_sendrecv_generic_if($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
corenet_udp_sendrecv_generic_if($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
corenet_raw_sendrecv_generic_if($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
corenet_tcp_sendrecv_all_nodes($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
corenet_udp_sendrecv_all_nodes($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
corenet_raw_sendrecv_all_nodes($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
corenet_tcp_sendrecv_all_ports($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
corenet_udp_sendrecv_all_ports($1_spamc_t)
|
|
Chris PeBenito |
bd7037 |
corenet_non_ipsec_sendrecv($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
corenet_tcp_bind_all_nodes($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
corenet_udp_bind_all_nodes($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
corenet_tcp_connect_all_ports($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
fs_search_auto_mountpoints($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
# cjp: these should probably be removed:
|
|
Chris PeBenito |
6820a3 |
corecmd_list_bin($1_spamc_t)
|
|
Chris PeBenito |
1815ba |
corecmd_read_bin_symlinks($1_spamc_t)
|
|
Chris PeBenito |
1815ba |
corecmd_read_bin_files($1_spamc_t)
|
|
Chris PeBenito |
1815ba |
corecmd_read_bin_pipes($1_spamc_t)
|
|
Chris PeBenito |
1815ba |
corecmd_read_bin_sockets($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
corecmd_list_sbin($1_spamc_t)
|
|
Chris PeBenito |
1815ba |
corecmd_read_sbin_symlinks($1_spamc_t)
|
|
Chris PeBenito |
1815ba |
corecmd_read_sbin_files($1_spamc_t)
|
|
Chris PeBenito |
1815ba |
corecmd_read_sbin_pipes($1_spamc_t)
|
|
Chris PeBenito |
1815ba |
corecmd_read_sbin_sockets($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
domain_use_wide_inherit_fd($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
files_read_etc_files($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
files_read_etc_runtime_files($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
files_read_usr_files($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
files_dontaudit_search_var($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
# cjp: this may be removable:
|
|
Chris PeBenito |
6820a3 |
files_list_home($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
libs_use_ld_so($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
libs_use_shared_libs($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
logging_send_syslog_msg($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
miscfiles_read_localization($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
# cjp: this should probably be removed:
|
|
Chris PeBenito |
6820a3 |
seutil_read_config($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
sysnet_read_config($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
userdom_use_unpriv_users_fd($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
# cjp: this really should just be the
|
|
Chris PeBenito |
6820a3 |
# terminal specific to the role
|
|
Chris PeBenito |
1815ba |
userdom_use_unpriv_users_ptys($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
# cjp: this should probably be removed:
|
|
Chris PeBenito |
6820a3 |
tunable_policy(`read_default_t',`
|
|
Chris PeBenito |
6820a3 |
files_list_default($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
files_read_default_files($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
files_read_default_symlinks($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
files_read_default_sockets($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
files_read_default_pipes($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
')
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
optional_policy(`mount',`
|
|
Chris PeBenito |
6820a3 |
mount_send_nfs_client_request($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
')
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
optional_policy(`nis',`
|
|
Chris PeBenito |
6820a3 |
nis_use_ypbind($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
')
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
optional_policy(`nscd',`
|
|
Chris PeBenito |
1815ba |
nscd_socket_use($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
')
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
optional_policy(`sendmail',`
|
|
Chris PeBenito |
6820a3 |
mta_read_config($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
sendmail_stub($1_spamc_t)
|
|
Chris PeBenito |
6820a3 |
')
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
##############################
|
|
Chris PeBenito |
6820a3 |
#
|
|
Chris PeBenito |
6820a3 |
# $1_spamassassin_t local policy
|
|
Chris PeBenito |
6820a3 |
#
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap };
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t self:fd use;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t self:sock_file r_file_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t self:unix_stream_socket create_stream_socket_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t self:unix_dgram_socket sendto;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t self:unix_stream_socket connectto;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t self:shm create_shm_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t self:sem create_sem_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t self:msgq create_msgq_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t self:msg { send receive };
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t $1_spamassassin_home_t:dir create_dir_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t $1_spamassassin_home_t:file create_file_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t $1_spamassassin_home_t:lnk_file create_lnk_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t $1_spamassassin_home_t:sock_file create_file_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t $1_spamassassin_home_t:fifo_file create_file_perms;
|
|
Chris PeBenito |
9417cb |
userdom_filetrans_user_home_dir($1,$1_spamassassin_t,$1_spamassassin_home_t,{ dir file lnk_file sock_file fifo_file })
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t $1_spamassassin_tmp_t:dir create_dir_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t $1_spamassassin_tmp_t:file create_file_perms;
|
|
Chris PeBenito |
9d5949 |
files_filetrans_tmp($1_spamassassin_t, $1_spamassassin_tmp_t, { file dir })
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
allow $2 $1_spamassassin_home_t:dir { create_dir_perms relabelfrom relabelto };
|
|
Chris PeBenito |
6820a3 |
allow $2 $1_spamassassin_home_t:file { create_file_perms relabelfrom relabelto };
|
|
Chris PeBenito |
6820a3 |
allow $2 $1_spamassassin_home_t:lnk_file { create_lnk_perms relabelfrom relabelto };
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
domain_auto_trans($2, spamassassin_exec_t, $1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
allow $2 $1_spamassassin_t:fd use;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t $2:fd use;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t $2:fifo_file rw_file_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t $2:process sigchld;
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
allow spamd_t $1_spamassassin_home_t:dir create_dir_perms;
|
|
Chris PeBenito |
6820a3 |
allow spamd_t $1_spamassassin_home_t:file create_file_perms;
|
|
Chris PeBenito |
6820a3 |
allow spamd_t $1_spamassassin_home_t:lnk_file create_lnk_perms;
|
|
Chris PeBenito |
6820a3 |
allow spamd_t $1_spamassassin_home_t:sock_file create_file_perms;
|
|
Chris PeBenito |
6820a3 |
allow spamd_t $1_spamassassin_home_t:fifo_file create_file_perms;
|
|
Chris PeBenito |
9417cb |
userdom_filetrans_user_home_dir($1,spamd_t,$1_spamassassin_home_t,{ dir file lnk_file sock_file fifo_file })
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
445522 |
kernel_read_kernel_sysctls($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
dev_read_urand($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
fs_search_auto_mountpoints($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
# this should probably be removed
|
|
Chris PeBenito |
6820a3 |
corecmd_list_bin($1_spamassassin_t)
|
|
Chris PeBenito |
1815ba |
corecmd_read_bin_symlinks($1_spamassassin_t)
|
|
Chris PeBenito |
1815ba |
corecmd_read_bin_files($1_spamassassin_t)
|
|
Chris PeBenito |
1815ba |
corecmd_read_bin_pipes($1_spamassassin_t)
|
|
Chris PeBenito |
1815ba |
corecmd_read_bin_sockets($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
corecmd_list_sbin($1_spamassassin_t)
|
|
Chris PeBenito |
1815ba |
corecmd_read_sbin_symlinks($1_spamassassin_t)
|
|
Chris PeBenito |
1815ba |
corecmd_read_sbin_files($1_spamassassin_t)
|
|
Chris PeBenito |
1815ba |
corecmd_read_sbin_pipes($1_spamassassin_t)
|
|
Chris PeBenito |
1815ba |
corecmd_read_sbin_sockets($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
domain_use_wide_inherit_fd($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
files_read_etc_files($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
files_read_etc_runtime_files($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
files_list_home($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
files_read_usr_files($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
files_dontaudit_search_var($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
libs_use_ld_so($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
libs_use_shared_libs($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
logging_send_syslog_msg($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
miscfiles_read_localization($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
# cjp: this could probably be removed
|
|
Chris PeBenito |
6820a3 |
seutil_read_config($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
sysnet_dns_name_resolve($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
userdom_use_unpriv_users_fd($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
userdom_search_user_home($1,$1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
# cjp: this really should just be the
|
|
Chris PeBenito |
6820a3 |
# terminal specific to the role
|
|
Chris PeBenito |
1815ba |
userdom_use_unpriv_users_ptys($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
# this should probably be removed:
|
|
Chris PeBenito |
6820a3 |
tunable_policy(`read_default_t',`
|
|
Chris PeBenito |
6820a3 |
files_list_default($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
files_read_default_files($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
files_read_default_symlinks($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
files_read_default_sockets($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
files_read_default_pipes($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
')
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
# set tunable if you have spamassassin do DNS lookups
|
|
Chris PeBenito |
6820a3 |
tunable_policy(`spamassasin_can_network',`
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t self:tcp_socket create_stream_socket_perms;
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
corenet_tcp_sendrecv_generic_if($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
corenet_udp_sendrecv_generic_if($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
corenet_raw_sendrecv_generic_if($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
corenet_tcp_sendrecv_all_nodes($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
corenet_udp_sendrecv_all_nodes($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
corenet_raw_sendrecv_all_nodes($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
corenet_tcp_sendrecv_all_ports($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
corenet_udp_sendrecv_all_ports($1_spamassassin_t)
|
|
Chris PeBenito |
bd7037 |
corenet_non_ipsec_sendrecv($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
corenet_tcp_bind_all_nodes($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
corenet_udp_bind_all_nodes($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
corenet_tcp_connect_all_ports($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
sysnet_read_config($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
')
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
tunable_policy(`use_nfs_home_dirs',`
|
|
Chris PeBenito |
6820a3 |
fs_manage_nfs_dirs($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
fs_manage_nfs_files($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
fs_manage_nfs_symlinks($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
')
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
tunable_policy(`use_samba_home_dirs',`
|
|
Chris PeBenito |
6820a3 |
fs_manage_cifs_dirs($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
fs_manage_cifs_files($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
fs_manage_cifs_symlinks($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
')
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
optional_policy(`nis',`
|
|
Chris PeBenito |
757207 |
# cjp: clearly some redundancy here
|
|
Chris PeBenito |
757207 |
|
|
Chris PeBenito |
6820a3 |
nis_use_ypbind($1_spamassassin_t)
|
|
Chris PeBenito |
757207 |
|
|
Chris PeBenito |
757207 |
tunable_policy(`spamassasin_can_network && allow_ypbind',`
|
|
Chris PeBenito |
757207 |
nis_use_ypbind_uncond($1_spamassassin_t)
|
|
Chris PeBenito |
757207 |
')
|
|
Chris PeBenito |
6820a3 |
')
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
optional_policy(`sendmail',`
|
|
Chris PeBenito |
6820a3 |
mta_read_config($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
sendmail_stub($1_spamassassin_t)
|
|
Chris PeBenito |
6820a3 |
')
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
# For perl libraries.
|
|
Chris PeBenito |
6820a3 |
allow $1_spamassassin_t lib_t:file rx_file_perms;
|
|
Chris PeBenito |
6820a3 |
')
|
|
Chris PeBenito |
3e6c81 |
|
|
Chris PeBenito |
3e6c81 |
########################################
|
|
Chris PeBenito |
3e6c81 |
## <summary>
|
|
Chris PeBenito |
3e6c81 |
## Execute the standalone spamassassin
|
|
Chris PeBenito |
3e6c81 |
## program in the caller directory.
|
|
Chris PeBenito |
3e6c81 |
## </summary>
|
|
Chris PeBenito |
3e6c81 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
3e6c81 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
3e6c81 |
## </param>
|
|
Chris PeBenito |
3e6c81 |
#
|
|
Chris PeBenito |
3e6c81 |
interface(`spamassassin_exec',`
|
|
Chris PeBenito |
3e6c81 |
gen_require(`
|
|
Chris PeBenito |
3e6c81 |
type spamassassin_exec_t;
|
|
Chris PeBenito |
3e6c81 |
')
|
|
Chris PeBenito |
3e6c81 |
|
|
Chris PeBenito |
3e6c81 |
can_exec($1,spamassassin_exec_t)
|
|
Chris PeBenito |
3e6c81 |
|
|
Chris PeBenito |
3e6c81 |
')
|
|
Chris PeBenito |
3e6c81 |
|
|
Chris PeBenito |
3e6c81 |
########################################
|
|
Chris PeBenito |
3e6c81 |
## <summary>
|
|
Chris PeBenito |
3e6c81 |
## Execute the spamassassin client
|
|
Chris PeBenito |
3e6c81 |
## program in the caller directory.
|
|
Chris PeBenito |
3e6c81 |
## </summary>
|
|
Chris PeBenito |
3e6c81 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
3e6c81 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
3e6c81 |
## </param>
|
|
Chris PeBenito |
3e6c81 |
#
|
|
Chris PeBenito |
3e6c81 |
interface(`spamassassin_exec_client',`
|
|
Chris PeBenito |
3e6c81 |
gen_require(`
|
|
Chris PeBenito |
3e6c81 |
type spamc_exec_t;
|
|
Chris PeBenito |
3e6c81 |
')
|
|
Chris PeBenito |
3e6c81 |
|
|
Chris PeBenito |
3e6c81 |
can_exec($1,spamc_exec_t)
|
|
Chris PeBenito |
3e6c81 |
')
|