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