Chris PeBenito 31b7c0
#DESC fcron - additions to cron policy for a more powerful cron program
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# Domain for fcron, a more powerful cron program.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# Needs cron.te installed.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# Author: Russell Coker <russell@coker.com.au>
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Use capabilities.
Chris PeBenito 31b7c0
allow crond_t self:capability { dac_override dac_read_search };
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# differences between r_dir_perms and rw_dir_perms
Chris PeBenito 31b7c0
allow crond_t cron_spool_t:dir { add_name remove_name write };
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
ifdef(`mta.te', `
Chris PeBenito 31b7c0
# not sure why we need write access, but Postfix does not work without it
Chris PeBenito 31b7c0
# I will have to change fcron to avoid the need for this
Chris PeBenito 31b7c0
allow { system_mail_t mta_user_agent } cron_spool_t:file { read write getattr };
Chris PeBenito 31b7c0
')
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
ifdef(`distro_debian', `
Chris PeBenito 31b7c0
can_exec(dpkg_t, crontab_exec_t)
Chris PeBenito 31b7c0
file_type_auto_trans(dpkg_t, cron_spool_t, sysadm_cron_spool_t, file)
Chris PeBenito 31b7c0
')
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
rw_dir_create_file(crond_t, cron_spool_t)
Chris PeBenito 31b7c0
can_setfscreate(crond_t)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# for /var/run/fcron.fifo
Chris PeBenito 31b7c0
file_type_auto_trans(crond_t, var_run_t, crond_var_run_t, sock_file)