Chris PeBenito 29af4c
policy_module(tmpreaper, 1.5.0)
Chris PeBenito ed78ea
Chris PeBenito ed78ea
########################################
Chris PeBenito ed78ea
#
Chris PeBenito ed78ea
# Declarations
Chris PeBenito ed78ea
#
Chris PeBenito ed78ea
Chris PeBenito ed78ea
type tmpreaper_t;
Chris PeBenito ed78ea
type tmpreaper_exec_t;
Chris PeBenito 0bfccd
application_domain(tmpreaper_t, tmpreaper_exec_t)
Chris PeBenito d46cfe
role system_r types tmpreaper_t;
Chris PeBenito ed78ea
Chris PeBenito ed78ea
########################################
Chris PeBenito ed78ea
#
Chris PeBenito ed78ea
# Local Policy
Chris PeBenito ed78ea
#
Chris PeBenito ed78ea
Chris PeBenito ed78ea
allow tmpreaper_t self:process { fork sigchld };
Chris PeBenito ed78ea
allow tmpreaper_t self:capability { dac_override dac_read_search fowner };
Chris PeBenito ed78ea
Chris PeBenito ed78ea
dev_read_urand(tmpreaper_t)
Chris PeBenito ed78ea
Chris PeBenito ed78ea
fs_getattr_xattr_fs(tmpreaper_t)
Chris PeBenito ed78ea
Chris PeBenito ed78ea
files_read_etc_files(tmpreaper_t)
Chris PeBenito ed78ea
files_read_var_lib_files(tmpreaper_t)
Chris PeBenito ed78ea
files_purge_tmp(tmpreaper_t)
Dan Walsh 3eaa99
files_delete_usr_dirs(tmpreaper_t)
Dan Walsh 3eaa99
files_delete_usr_files(tmpreaper_t)
Chris PeBenito ed78ea
# why does it need setattr?
Chris PeBenito ed78ea
files_setattr_all_tmp_dirs(tmpreaper_t)
Dan Walsh 3eaa99
files_setattr_usr_dirs(tmpreaper_t)
Chris PeBenito 5be35f
files_getattr_all_dirs(tmpreaper_t)
Chris PeBenito 5be35f
files_getattr_all_files(tmpreaper_t)
Chris PeBenito ed78ea
Chris PeBenito f8233a
mls_file_read_all_levels(tmpreaper_t)
Chris PeBenito f8233a
mls_file_write_all_levels(tmpreaper_t)
Chris PeBenito bf080a
Chris PeBenito ed78ea
logging_send_syslog_msg(tmpreaper_t)
Chris PeBenito ed78ea
Chris PeBenito ed78ea
miscfiles_read_localization(tmpreaper_t)
Chris PeBenito cf6a7d
miscfiles_delete_man_pages(tmpreaper_t)
Chris PeBenito ed78ea
Chris PeBenito 0bfccd
cron_system_entry(tmpreaper_t, tmpreaper_exec_t)
Chris PeBenito ed78ea
Chris PeBenito 5be35f
ifdef(`distro_redhat',`
Jeremy Solt 8daddc
	userdom_list_user_home_content(tmpreaper_t)
Chris PeBenito 5be35f
	userdom_delete_user_home_content_dirs(tmpreaper_t)
Chris PeBenito 5be35f
	userdom_delete_user_home_content_files(tmpreaper_t)
Chris PeBenito 5be35f
	userdom_delete_user_home_content_symlinks(tmpreaper_t)
Chris PeBenito 5be35f
')
Chris PeBenito 5be35f
Chris PeBenito 5be35f
optional_policy(`
Chris PeBenito 5be35f
	amavis_manage_spool_files(tmpreaper_t)
Chris PeBenito 5be35f
')
Chris PeBenito 5be35f
Chris PeBenito 5be35f
optional_policy(`
Dan Walsh 3eaa99
	apache_delete_sys_content_rw(tmpreaper_t)
Jeremy Solt 8daddc
	apache_list_cache(tmpreaper_t)
Dan Walsh 3eaa99
	apache_delete_cache_dirs(tmpreaper_t)
Jeremy Solt 2483d7
	apache_delete_cache_files(tmpreaper_t)
Jeremy Solt 8daddc
	apache_setattr_cache_dirs(tmpreaper_t)
Jeremy Solt 8daddc
')
Jeremy Solt 8daddc
Jeremy Solt 8daddc
optional_policy(`
Chris PeBenito 5be35f
	kismet_manage_log(tmpreaper_t)
Chris PeBenito 5be35f
')
Chris PeBenito 5be35f
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito a52492
	lpd_manage_spool(tmpreaper_t)
Chris PeBenito a52492
')
Chris PeBenito 5be35f
Chris PeBenito 5be35f
optional_policy(`
Dan Walsh 3eaa99
	sandbox_list(tmpreaper_t)
Dan Walsh 3eaa99
	sandbox_delete_dirs(tmpreaper_t)
Dan Walsh 3eaa99
	sandbox_delete_files(tmpreaper_t)
Dan Walsh 3eaa99
	sandbox_delete_sock_files(tmpreaper_t)
Dan Walsh 3eaa99
	sandbox_setattr_dirs(tmpreaper_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Jeremy Solt 8daddc
	rpm_manage_cache(tmpreaper_t)
Jeremy Solt 8daddc
')
Jeremy Solt 8daddc
Jeremy Solt 8daddc
optional_policy(`
Chris PeBenito 5be35f
	unconfined_domain(tmpreaper_t)
Chris PeBenito 5be35f
')