Chris PeBenito 0fbfa5
#DESC Tmpreaper - Monitor and maintain temporary files
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Author:  Russell Coker <russell@coker.com.au>
Chris PeBenito 0fbfa5
# X-Debian-Packages: tmpreaper
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
#################################
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Rules for the tmpreaper_t domain.
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
type tmpreaper_t, domain, privlog;
Chris PeBenito 0fbfa5
type tmpreaper_exec_t, file_type, sysadmfile, exec_type;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
role system_r types tmpreaper_t;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
system_crond_entry(tmpreaper_exec_t, tmpreaper_t)
Chris PeBenito 0fbfa5
uses_shlib(tmpreaper_t)
Chris PeBenito 0fbfa5
# why does it need setattr?
Chris PeBenito 0fbfa5
allow tmpreaper_t tmpfile:dir { setattr rw_dir_perms rmdir };
Chris PeBenito 0fbfa5
allow tmpreaper_t tmpfile:notdevfile_class_set { getattr unlink };
Chris PeBenito 0fbfa5
allow tmpreaper_t { home_type file_t }:notdevfile_class_set { getattr unlink };
Chris PeBenito 0fbfa5
allow tmpreaper_t self:process { fork sigchld };
Chris PeBenito 0fbfa5
allow tmpreaper_t self:capability { dac_override dac_read_search fowner };
Chris PeBenito 0fbfa5
allow tmpreaper_t fs_t:filesystem getattr;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
r_dir_file(tmpreaper_t, etc_t)
Chris PeBenito 0fbfa5
allow tmpreaper_t var_t:dir { getattr search };
Chris PeBenito 0fbfa5
r_dir_file(tmpreaper_t, var_lib_t)
Chris PeBenito 0fbfa5
allow tmpreaper_t device_t:dir { getattr search };
Chris PeBenito 0fbfa5
allow tmpreaper_t urandom_device_t:chr_file { getattr read };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
read_locale(tmpreaper_t)
Chris PeBenito 0fbfa5