Chris PeBenito 0fbfa5
#DESC Spamd - Spamassassin daemon
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Author: Colin Walters <walters@debian.org>
Chris PeBenito 0fbfa5
# X-Debian-Packages: spamassassin
Chris PeBenito 0fbfa5
# Depends: spamassassin.te
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
daemon_domain(spamd)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
tmp_domain(spamd)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow spamd_t spamd_port_t:tcp_socket name_bind;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
general_domain_access(spamd_t)
Chris PeBenito 0fbfa5
uses_shlib(spamd_t)
Chris PeBenito 0fbfa5
can_ypbind(spamd_t)
Chris PeBenito 0fbfa5
read_sysctl(spamd_t)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Various Perl bits
Chris PeBenito 0fbfa5
allow spamd_t lib_t:file rx_file_perms;
Chris PeBenito 0fbfa5
dontaudit spamd_t shadow_t:file { getattr read };
Chris PeBenito 0fbfa5
dontaudit spamd_t initrc_var_run_t:file { read write lock };
Chris PeBenito 0fbfa5
dontaudit spamd_t sysadm_home_dir_t:dir getattr;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
can_network_server(spamd_t)
Chris PeBenito 0fbfa5
allow spamd_t self:capability net_bind_service;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow spamd_t proc_t:file { getattr read };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Spamassassin, when run as root and using per-user config files,
Chris PeBenito 0fbfa5
# setuids to the user running spamc.  Comment this if you are not
Chris PeBenito 0fbfa5
# using this ability.
Chris PeBenito 0fbfa5
allow spamd_t self:capability { setuid setgid dac_override sys_tty_config };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow spamd_t { bin_t sbin_t }:dir { getattr search };
Chris PeBenito 0fbfa5
can_exec(spamd_t, bin_t)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
ifdef(`sendmail.te', `
Chris PeBenito 0fbfa5
allow spamd_t etc_mail_t:dir { getattr read search };
Chris PeBenito 0fbfa5
allow spamd_t etc_mail_t:file { getattr ioctl read };
Chris PeBenito 0fbfa5
')
Chris PeBenito 0fbfa5
allow spamd_t { etc_t etc_runtime_t }:file { getattr ioctl read };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
ifdef(`amavis.te', `
Chris PeBenito 0fbfa5
# for bayes tokens
Chris PeBenito 0fbfa5
allow spamd_t var_lib_t:dir { getattr search };
Chris PeBenito 0fbfa5
rw_dir_create_file(spamd_t, amavisd_lib_t)
Chris PeBenito 0fbfa5
')
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow spamd_t usr_t:file { getattr ioctl read };
Chris PeBenito 0fbfa5
allow spamd_t usr_t:lnk_file { getattr read };
Chris PeBenito 0fbfa5
allow spamd_t urandom_device_t:chr_file { getattr read };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
system_crond_entry(spamd_exec_t, spamd_t)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow spamd_t autofs_t:dir { search getattr };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
if (use_nfs_home_dirs) {
Chris PeBenito 0fbfa5
allow spamd_t nfs_t:dir rw_dir_perms;
Chris PeBenito 0fbfa5
allow spamd_t nfs_t:file create_file_perms;
Chris PeBenito 0fbfa5
}
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
if (use_samba_home_dirs) {
Chris PeBenito 0fbfa5
allow spamd_t cifs_t:dir rw_dir_perms;
Chris PeBenito 0fbfa5
allow spamd_t cifs_t:file create_file_perms;
Chris PeBenito 0fbfa5
}
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow spamd_t home_root_t:dir getattr;
Chris PeBenito 0fbfa5
allow spamd_t user_home_dir_type:dir { search getattr };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5