Chris PeBenito 29af4c1
policy_module(logwatch, 1.11.0)
Chris PeBenito 020cbef
Chris PeBenito 020cbef
#################################
Chris PeBenito 020cbef
#
Chris PeBenito 020cbef
# Declarations
Chris PeBenito 020cbef
#
Chris PeBenito 020cbef
Chris PeBenito 020cbef
type logwatch_t;
Chris PeBenito 020cbef
type logwatch_exec_t;
Chris PeBenito 0bfccda
application_domain(logwatch_t, logwatch_exec_t)
Chris PeBenito 020cbef
role system_r types logwatch_t;
Chris PeBenito 020cbef
Chris PeBenito 020cbef
type logwatch_cache_t;
Chris PeBenito 020cbef
files_type(logwatch_cache_t)
Chris PeBenito 020cbef
Chris PeBenito 73ca55d
type logwatch_lock_t;
Chris PeBenito 73ca55d
files_lock_file(logwatch_lock_t)
Chris PeBenito 73ca55d
Chris PeBenito 020cbef
type logwatch_tmp_t;
Chris PeBenito 020cbef
files_tmp_file(logwatch_tmp_t)
Chris PeBenito 020cbef
3eaa993
type logwatch_var_run_t;
3eaa993
files_pid_file(logwatch_var_run_t)
3eaa993
Chris PeBenito 020cbef
########################################
Chris PeBenito 020cbef
#
Chris PeBenito 020cbef
# Local policy
Chris PeBenito 020cbef
#
Chris PeBenito 020cbef
Chris PeBenito 123a990
allow logwatch_t self:capability { dac_override dac_read_search setgid };
Chris PeBenito 73ca55d
allow logwatch_t self:process signal;
Chris PeBenito 020cbef
allow logwatch_t self:fifo_file rw_file_perms;
Chris PeBenito 020cbef
allow logwatch_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 020cbef
Chris PeBenito 0bfccda
manage_dirs_pattern(logwatch_t, logwatch_cache_t, logwatch_cache_t)
Chris PeBenito 0bfccda
manage_files_pattern(logwatch_t, logwatch_cache_t, logwatch_cache_t)
Chris PeBenito 020cbef
Chris PeBenito 73ca55d
allow logwatch_t logwatch_lock_t:file manage_file_perms;
Chris PeBenito 3f67f72
files_lock_filetrans(logwatch_t, logwatch_lock_t, file)
Chris PeBenito 73ca55d
Chris PeBenito 0bfccda
manage_dirs_pattern(logwatch_t, logwatch_tmp_t, logwatch_tmp_t)
Chris PeBenito 0bfccda
manage_files_pattern(logwatch_t, logwatch_tmp_t, logwatch_tmp_t)
Chris PeBenito 103fe28
files_tmp_filetrans(logwatch_t, logwatch_tmp_t, { file dir })
Chris PeBenito 020cbef
3eaa993
allow logwatch_t logwatch_var_run_t:file manage_file_perms;
3eaa993
files_pid_filetrans(logwatch_t, logwatch_var_run_t, file)
3eaa993
Chris PeBenito 445522d
kernel_read_fs_sysctls(logwatch_t)
Chris PeBenito 445522d
kernel_read_kernel_sysctls(logwatch_t)
Chris PeBenito 020cbef
kernel_read_system_state(logwatch_t)
Chris PeBenito 3c9b2e9
kernel_read_net_sysctls(logwatch_t)
Chris PeBenito 3c9b2e9
kernel_read_network_state(logwatch_t)
Chris PeBenito 020cbef
Chris PeBenito 020cbef
corecmd_exec_bin(logwatch_t)
Chris PeBenito 020cbef
corecmd_exec_shell(logwatch_t)
Chris PeBenito 020cbef
Chris PeBenito 020cbef
dev_read_urand(logwatch_t)
Chris PeBenito 2f27163
dev_read_sysfs(logwatch_t)
Chris PeBenito 020cbef
Chris PeBenito 020cbef
# Read /proc/PID directories for all domains.
Chris PeBenito 020cbef
domain_read_all_domains_state(logwatch_t)
Chris PeBenito 020cbef
Chris PeBenito 6b19be3
files_list_var(logwatch_t)
Chris PeBenito 3c9b2e9
files_read_var_symlinks(logwatch_t)
Chris PeBenito 020cbef
files_read_etc_files(logwatch_t)
Chris PeBenito 020cbef
files_read_etc_runtime_files(logwatch_t)
Chris PeBenito 020cbef
files_read_usr_files(logwatch_t)
Chris PeBenito 020cbef
files_search_spool(logwatch_t)
Chris PeBenito 7249255
files_search_mnt(logwatch_t)
Chris PeBenito 020cbef
files_dontaudit_search_home(logwatch_t)
Chris PeBenito 8708d9b
files_dontaudit_search_boot(logwatch_t)
Chris PeBenito 6649aec
# Execs df and if file system mounted with a context avc raised
Chris PeBenito 6649aec
files_dontaudit_search_all_dirs(logwatch_t)
Chris PeBenito 020cbef
Chris PeBenito 020cbef
fs_getattr_all_fs(logwatch_t)
Chris PeBenito 8708d9b
fs_dontaudit_list_auto_mountpoints(logwatch_t)
Chris PeBenito 3c9b2e9
fs_list_inotifyfs(logwatch_t)
Chris PeBenito 020cbef
Chris PeBenito 1815bad
term_dontaudit_getattr_pty_dirs(logwatch_t)
Chris PeBenito 020cbef
term_dontaudit_list_ptys(logwatch_t)
Chris PeBenito 020cbef
Chris PeBenito 3c9b2e9
auth_use_nsswitch(logwatch_t)
Chris PeBenito 020cbef
auth_dontaudit_read_shadow(logwatch_t)
Chris PeBenito 020cbef
Chris PeBenito 8d2c341
init_read_utmp(logwatch_t)
Chris PeBenito 8d2c341
init_dontaudit_write_utmp(logwatch_t)
Chris PeBenito 8d2c341
Chris PeBenito 1815bad
libs_read_lib_files(logwatch_t)
Chris PeBenito 020cbef
Chris PeBenito 020cbef
logging_read_all_logs(logwatch_t)
Chris PeBenito 9af48ee
logging_send_syslog_msg(logwatch_t) 
Chris PeBenito 020cbef
Chris PeBenito 020cbef
miscfiles_read_localization(logwatch_t)
Chris PeBenito 020cbef
Chris PeBenito a225f98
selinux_dontaudit_getattr_dir(logwatch_t)
Chris PeBenito a225f98
Chris PeBenito 0f27d98
sysnet_dns_name_resolve(logwatch_t)
Chris PeBenito 3c9b2e9
sysnet_exec_ifconfig(logwatch_t)
Chris PeBenito 0f27d98
Chris PeBenito 296273a
userdom_dontaudit_search_user_home_dirs(logwatch_t)
3eaa993
userdom_dontaudit_list_admin_dir(logwatch_t)
3eaa993
3eaa993
#mta_send_mail(logwatch_t)
3eaa993
mta_base_mail_template(logwatch)
3eaa993
mta_sendmail_domtrans(logwatch_t, logwatch_mail_t)
3eaa993
role system_r types logwatch_mail_t;
3eaa993
logging_read_all_logs(logwatch_mail_t)
3eaa993
manage_files_pattern(logwatch_mail_t, logwatch_tmp_t, logwatch_tmp_t)
3eaa993
allow logwatch_mail_t self:capability { dac_read_search dac_override };
3eaa993
mta_read_home(logwatch_mail_t)
Chris PeBenito e9c6cda
Chris PeBenito adea587
ifdef(`distro_redhat',`
Chris PeBenito adea587
	files_search_all(logwatch_t)
Chris PeBenito adea587
	files_getattr_all_file_type_fs(logwatch_t)
Chris PeBenito adea587
')
Chris PeBenito adea587
Chris PeBenito e2e1b67
tunable_policy(`use_nfs_home_dirs',`
Chris PeBenito e2e1b67
	fs_list_nfs(logwatch_t)
Chris PeBenito e2e1b67
')
Chris PeBenito e2e1b67
Chris PeBenito e2e1b67
tunable_policy(`use_samba_home_dirs',`
Chris PeBenito e2e1b67
	fs_list_cifs(logwatch_t)
Chris PeBenito e2e1b67
')
Chris PeBenito e2e1b67
Chris PeBenito bb7170f
optional_policy(`
Chris PeBenito 020cbef
	apache_read_log(logwatch_t)
Chris PeBenito 020cbef
')
Chris PeBenito 020cbef
Chris PeBenito bb7170f
optional_policy(`
Chris PeBenito 517618f
	avahi_dontaudit_search_pid(logwatch_t)
Chris PeBenito 517618f
')
Chris PeBenito 517618f
Chris PeBenito 517618f
optional_policy(`
Chris PeBenito 020cbef
	bind_read_config(logwatch_t)
Chris PeBenito 020cbef
	bind_read_zone(logwatch_t)
Chris PeBenito 020cbef
')
Chris PeBenito 020cbef
Chris PeBenito bb7170f
optional_policy(`
Chris PeBenito 020cbef
	cron_system_entry(logwatch_t, logwatch_exec_t)
Chris PeBenito 020cbef
')
Chris PeBenito 020cbef
Chris PeBenito bb7170f
optional_policy(`
Chris PeBenito 73ca55d
	hostname_exec(logwatch_t)
Chris PeBenito 73ca55d
')
Chris PeBenito 73ca55d
Chris PeBenito 73ca55d
optional_policy(`
Chris PeBenito 020cbef
	mta_getattr_spool(logwatch_t)
Chris PeBenito 020cbef
')
Chris PeBenito 020cbef
Chris PeBenito bb7170f
optional_policy(`
Chris PeBenito a225f98
	ntp_domtrans(logwatch_t)
Chris PeBenito a225f98
')
Chris PeBenito a225f98
Chris PeBenito bb7170f
optional_policy(`
Chris PeBenito 020cbef
	rpc_search_nfs_state_data(logwatch_t)
Chris PeBenito 020cbef
')
Chris PeBenito 020cbef
Chris PeBenito bb7170f
optional_policy(`
Chris PeBenito 020cbef
	samba_read_log(logwatch_t)
Jeremy Solt 42fa15b
	samba_read_share_files(logwatch_t)
Chris PeBenito 020cbef
')