Chris PeBenito 020cbe
Chris PeBenito cfcf50
policy_module(logwatch, 1.8.0)
Chris PeBenito 020cbe
Chris PeBenito 020cbe
#################################
Chris PeBenito 020cbe
#
Chris PeBenito 020cbe
# Declarations
Chris PeBenito 020cbe
#
Chris PeBenito 020cbe
Chris PeBenito 020cbe
type logwatch_t;
Chris PeBenito 020cbe
type logwatch_exec_t;
Chris PeBenito 0bfccd
application_domain(logwatch_t, logwatch_exec_t)
Chris PeBenito 020cbe
role system_r types logwatch_t;
Chris PeBenito 020cbe
Chris PeBenito 020cbe
type logwatch_cache_t;
Chris PeBenito 020cbe
files_type(logwatch_cache_t)
Chris PeBenito 020cbe
Chris PeBenito 73ca55
type logwatch_lock_t;
Chris PeBenito 73ca55
files_lock_file(logwatch_lock_t)
Chris PeBenito 73ca55
Chris PeBenito 020cbe
type logwatch_tmp_t;
Chris PeBenito 020cbe
files_tmp_file(logwatch_tmp_t)
Chris PeBenito 020cbe
Chris PeBenito 020cbe
########################################
Chris PeBenito 020cbe
#
Chris PeBenito 020cbe
# Local policy
Chris PeBenito 020cbe
#
Chris PeBenito 020cbe
Chris PeBenito 123a99
allow logwatch_t self:capability { dac_override dac_read_search setgid };
Chris PeBenito 73ca55
allow logwatch_t self:process signal;
Chris PeBenito 020cbe
allow logwatch_t self:fifo_file rw_file_perms;
Chris PeBenito 020cbe
allow logwatch_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 020cbe
Chris PeBenito 0bfccd
manage_dirs_pattern(logwatch_t, logwatch_cache_t, logwatch_cache_t)
Chris PeBenito 0bfccd
manage_files_pattern(logwatch_t, logwatch_cache_t, logwatch_cache_t)
Chris PeBenito 020cbe
Chris PeBenito 73ca55
allow logwatch_t logwatch_lock_t:file manage_file_perms;
Chris PeBenito 73ca55
files_lock_filetrans(logwatch_t,logwatch_lock_t,file)
Chris PeBenito 73ca55
Chris PeBenito 0bfccd
manage_dirs_pattern(logwatch_t, logwatch_tmp_t, logwatch_tmp_t)
Chris PeBenito 0bfccd
manage_files_pattern(logwatch_t, logwatch_tmp_t, logwatch_tmp_t)
Chris PeBenito 103fe2
files_tmp_filetrans(logwatch_t, logwatch_tmp_t, { file dir })
Chris PeBenito 020cbe
Chris PeBenito 445522
kernel_read_fs_sysctls(logwatch_t)
Chris PeBenito 445522
kernel_read_kernel_sysctls(logwatch_t)
Chris PeBenito 020cbe
kernel_read_system_state(logwatch_t)
Chris PeBenito 020cbe
Chris PeBenito 020cbe
corecmd_exec_bin(logwatch_t)
Chris PeBenito 020cbe
corecmd_exec_shell(logwatch_t)
Chris PeBenito 020cbe
Chris PeBenito 020cbe
dev_read_urand(logwatch_t)
Chris PeBenito 2f2716
dev_read_sysfs(logwatch_t)
Chris PeBenito 020cbe
Chris PeBenito 020cbe
# Read /proc/PID directories for all domains.
Chris PeBenito 020cbe
domain_read_all_domains_state(logwatch_t)
Chris PeBenito 020cbe
Chris PeBenito 6b19be
files_list_var(logwatch_t)
Chris PeBenito 020cbe
files_read_etc_files(logwatch_t)
Chris PeBenito 020cbe
files_read_etc_runtime_files(logwatch_t)
Chris PeBenito 020cbe
files_read_usr_files(logwatch_t)
Chris PeBenito 020cbe
files_search_spool(logwatch_t)
Chris PeBenito 724925
files_search_mnt(logwatch_t)
Chris PeBenito 020cbe
files_dontaudit_search_home(logwatch_t)
Chris PeBenito 8708d9
files_dontaudit_search_boot(logwatch_t)
Chris PeBenito 6649ae
# Execs df and if file system mounted with a context avc raised
Chris PeBenito 6649ae
files_dontaudit_search_all_dirs(logwatch_t)
Chris PeBenito 020cbe
Chris PeBenito 020cbe
fs_getattr_all_fs(logwatch_t)
Chris PeBenito 8708d9
fs_dontaudit_list_auto_mountpoints(logwatch_t)
Chris PeBenito 020cbe
Chris PeBenito 1815ba
term_dontaudit_getattr_pty_dirs(logwatch_t)
Chris PeBenito 020cbe
term_dontaudit_list_ptys(logwatch_t)
Chris PeBenito 020cbe
Chris PeBenito 020cbe
auth_dontaudit_read_shadow(logwatch_t)
Chris PeBenito 020cbe
Chris PeBenito 8d2c34
init_read_utmp(logwatch_t)
Chris PeBenito 8d2c34
init_dontaudit_write_utmp(logwatch_t)
Chris PeBenito 8d2c34
Chris PeBenito 020cbe
libs_use_ld_so(logwatch_t)
Chris PeBenito 020cbe
libs_use_shared_libs(logwatch_t)
Chris PeBenito 1815ba
libs_read_lib_files(logwatch_t)
Chris PeBenito 020cbe
Chris PeBenito 020cbe
logging_read_all_logs(logwatch_t)
Chris PeBenito 9af48e
logging_send_syslog_msg(logwatch_t) 
Chris PeBenito 020cbe
Chris PeBenito 020cbe
miscfiles_read_localization(logwatch_t)
Chris PeBenito 020cbe
Chris PeBenito a225f9
selinux_dontaudit_getattr_dir(logwatch_t)
Chris PeBenito a225f9
Chris PeBenito 0f27d9
sysnet_dns_name_resolve(logwatch_t)
Chris PeBenito 0f27d9
Chris PeBenito 020cbe
mta_send_mail(logwatch_t)
Chris PeBenito 020cbe
Chris PeBenito e9c6cd
sysadm_dontaudit_search_home_dirs(logwatch_t)
Chris PeBenito e9c6cd
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 020cbe
	apache_read_log(logwatch_t)
Chris PeBenito 020cbe
')
Chris PeBenito 020cbe
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 8d2c34
	auth_use_nsswitch(logwatch_t)
Chris PeBenito 8d2c34
')
Chris PeBenito 8d2c34
Chris PeBenito 8d2c34
optional_policy(`
Chris PeBenito 517618
	avahi_dontaudit_search_pid(logwatch_t)
Chris PeBenito 517618
')
Chris PeBenito 517618
Chris PeBenito 517618
optional_policy(`
Chris PeBenito 020cbe
	bind_read_config(logwatch_t)
Chris PeBenito 020cbe
	bind_read_zone(logwatch_t)
Chris PeBenito 020cbe
')
Chris PeBenito 020cbe
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 020cbe
	cron_system_entry(logwatch_t, logwatch_exec_t)
Chris PeBenito 020cbe
')
Chris PeBenito 020cbe
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 73ca55
	hostname_exec(logwatch_t)
Chris PeBenito 73ca55
')
Chris PeBenito 73ca55
Chris PeBenito 73ca55
optional_policy(`
Chris PeBenito 020cbe
	mta_getattr_spool(logwatch_t)
Chris PeBenito 020cbe
')
Chris PeBenito 020cbe
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito a225f9
	ntp_domtrans(logwatch_t)
Chris PeBenito a225f9
')
Chris PeBenito a225f9
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 020cbe
	rpc_search_nfs_state_data(logwatch_t)
Chris PeBenito 020cbe
')
Chris PeBenito 020cbe
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 020cbe
	samba_read_log(logwatch_t)
Chris PeBenito 020cbe
')