2006-01-10 14:39:21 +00:00
|
|
|
|
2008-07-02 14:07:57 +00:00
|
|
|
policy_module(logwatch, 1.8.0)
|
2006-01-10 14:39:21 +00:00
|
|
|
|
|
|
|
#################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type logwatch_t;
|
|
|
|
type logwatch_exec_t;
|
2008-07-23 21:38:39 +00:00
|
|
|
application_domain(logwatch_t, logwatch_exec_t)
|
2006-01-10 14:39:21 +00:00
|
|
|
role system_r types logwatch_t;
|
|
|
|
|
|
|
|
type logwatch_cache_t;
|
|
|
|
files_type(logwatch_cache_t)
|
|
|
|
|
2006-09-13 18:35:10 +00:00
|
|
|
type logwatch_lock_t;
|
|
|
|
files_lock_file(logwatch_lock_t)
|
|
|
|
|
2006-01-10 14:39:21 +00:00
|
|
|
type logwatch_tmp_t;
|
|
|
|
files_tmp_file(logwatch_tmp_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
2006-06-21 18:25:06 +00:00
|
|
|
allow logwatch_t self:capability { dac_override dac_read_search setgid };
|
2006-09-13 18:35:10 +00:00
|
|
|
allow logwatch_t self:process signal;
|
2006-01-10 14:39:21 +00:00
|
|
|
allow logwatch_t self:fifo_file rw_file_perms;
|
|
|
|
allow logwatch_t self:unix_stream_socket create_stream_socket_perms;
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern(logwatch_t, logwatch_cache_t, logwatch_cache_t)
|
|
|
|
manage_files_pattern(logwatch_t, logwatch_cache_t, logwatch_cache_t)
|
2006-01-10 14:39:21 +00:00
|
|
|
|
2006-09-13 18:35:10 +00:00
|
|
|
allow logwatch_t logwatch_lock_t:file manage_file_perms;
|
|
|
|
files_lock_filetrans(logwatch_t,logwatch_lock_t,file)
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern(logwatch_t, logwatch_tmp_t, logwatch_tmp_t)
|
|
|
|
manage_files_pattern(logwatch_t, logwatch_tmp_t, logwatch_tmp_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
files_tmp_filetrans(logwatch_t, logwatch_tmp_t, { file dir })
|
2006-01-10 14:39:21 +00:00
|
|
|
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_fs_sysctls(logwatch_t)
|
|
|
|
kernel_read_kernel_sysctls(logwatch_t)
|
2006-01-10 14:39:21 +00:00
|
|
|
kernel_read_system_state(logwatch_t)
|
|
|
|
|
|
|
|
corecmd_exec_bin(logwatch_t)
|
|
|
|
corecmd_exec_shell(logwatch_t)
|
|
|
|
|
|
|
|
dev_read_urand(logwatch_t)
|
2007-10-18 19:31:14 +00:00
|
|
|
dev_read_sysfs(logwatch_t)
|
2006-01-10 14:39:21 +00:00
|
|
|
|
|
|
|
# Read /proc/PID directories for all domains.
|
|
|
|
domain_read_all_domains_state(logwatch_t)
|
|
|
|
|
2007-02-16 23:01:42 +00:00
|
|
|
files_list_var(logwatch_t)
|
2006-01-10 14:39:21 +00:00
|
|
|
files_read_etc_files(logwatch_t)
|
|
|
|
files_read_etc_runtime_files(logwatch_t)
|
|
|
|
files_read_usr_files(logwatch_t)
|
|
|
|
files_search_spool(logwatch_t)
|
2006-03-30 15:59:39 +00:00
|
|
|
files_search_mnt(logwatch_t)
|
2006-01-10 14:39:21 +00:00
|
|
|
files_dontaudit_search_home(logwatch_t)
|
2006-09-22 17:14:35 +00:00
|
|
|
files_dontaudit_search_boot(logwatch_t)
|
2007-06-11 15:43:37 +00:00
|
|
|
# Execs df and if file system mounted with a context avc raised
|
|
|
|
files_dontaudit_search_all_dirs(logwatch_t)
|
2006-01-10 14:39:21 +00:00
|
|
|
|
|
|
|
fs_getattr_all_fs(logwatch_t)
|
2006-09-22 17:14:35 +00:00
|
|
|
fs_dontaudit_list_auto_mountpoints(logwatch_t)
|
2006-01-10 14:39:21 +00:00
|
|
|
|
2006-02-02 21:08:12 +00:00
|
|
|
term_dontaudit_getattr_pty_dirs(logwatch_t)
|
2006-01-10 14:39:21 +00:00
|
|
|
term_dontaudit_list_ptys(logwatch_t)
|
|
|
|
|
|
|
|
auth_dontaudit_read_shadow(logwatch_t)
|
|
|
|
|
2007-08-22 20:02:41 +00:00
|
|
|
init_read_utmp(logwatch_t)
|
|
|
|
init_dontaudit_write_utmp(logwatch_t)
|
|
|
|
|
2006-02-02 21:08:12 +00:00
|
|
|
libs_read_lib_files(logwatch_t)
|
2006-01-10 14:39:21 +00:00
|
|
|
|
|
|
|
logging_read_all_logs(logwatch_t)
|
2007-04-10 13:10:58 +00:00
|
|
|
logging_send_syslog_msg(logwatch_t)
|
2006-01-10 14:39:21 +00:00
|
|
|
|
|
|
|
miscfiles_read_localization(logwatch_t)
|
|
|
|
|
2006-01-19 23:00:23 +00:00
|
|
|
selinux_dontaudit_getattr_dir(logwatch_t)
|
|
|
|
|
2006-02-27 16:23:39 +00:00
|
|
|
sysnet_dns_name_resolve(logwatch_t)
|
|
|
|
|
2006-01-10 14:39:21 +00:00
|
|
|
mta_send_mail(logwatch_t)
|
|
|
|
|
2008-04-29 13:58:34 +00:00
|
|
|
sysadm_dontaudit_search_home_dirs(logwatch_t)
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-10 14:39:21 +00:00
|
|
|
apache_read_log(logwatch_t)
|
|
|
|
')
|
|
|
|
|
2007-08-22 20:02:41 +00:00
|
|
|
optional_policy(`
|
|
|
|
auth_use_nsswitch(logwatch_t)
|
|
|
|
')
|
|
|
|
|
2007-05-02 17:55:03 +00:00
|
|
|
optional_policy(`
|
|
|
|
avahi_dontaudit_search_pid(logwatch_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-10 14:39:21 +00:00
|
|
|
bind_read_config(logwatch_t)
|
|
|
|
bind_read_zone(logwatch_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-10 14:39:21 +00:00
|
|
|
cron_system_entry(logwatch_t, logwatch_exec_t)
|
|
|
|
')
|
|
|
|
|
2006-09-13 18:35:10 +00:00
|
|
|
optional_policy(`
|
|
|
|
hostname_exec(logwatch_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-10 14:39:21 +00:00
|
|
|
mta_getattr_spool(logwatch_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-19 23:00:23 +00:00
|
|
|
ntp_domtrans(logwatch_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-10 14:39:21 +00:00
|
|
|
rpc_search_nfs_state_data(logwatch_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-10 14:39:21 +00:00
|
|
|
samba_read_log(logwatch_t)
|
|
|
|
')
|