selinux-policy/refpolicy/policy/modules/admin/logwatch.te
2006-03-07 14:12:39 +00:00

113 lines
2.4 KiB
Plaintext

policy_module(logwatch,1.1.0)
#################################
#
# Declarations
#
type logwatch_t;
type logwatch_exec_t;
domain_type(logwatch_t)
domain_entry_file(logwatch_t,logwatch_exec_t)
role system_r types logwatch_t;
type logwatch_cache_t;
files_type(logwatch_cache_t)
type logwatch_tmp_t;
files_tmp_file(logwatch_tmp_t)
########################################
#
# Local policy
#
allow logwatch_t self:capability setgid;
allow logwatch_t self:fifo_file rw_file_perms;
allow logwatch_t self:unix_stream_socket create_stream_socket_perms;
allow logwatch_t logwatch_cache_t:dir create_dir_perms;
allow logwatch_t logwatch_cache_t:file create_file_perms;
allow logwatch_t logwatch_tmp_t:dir create_dir_perms;
allow logwatch_t logwatch_tmp_t:file create_file_perms;
files_tmp_filetrans(logwatch_t, logwatch_tmp_t, { file dir })
kernel_read_fs_sysctls(logwatch_t)
kernel_read_kernel_sysctls(logwatch_t)
kernel_read_system_state(logwatch_t)
corecmd_read_sbin_symlinks(logwatch_t)
corecmd_read_sbin_files(logwatch_t)
corecmd_exec_bin(logwatch_t)
corecmd_exec_shell(logwatch_t)
dev_read_urand(logwatch_t)
# Read /proc/PID directories for all domains.
domain_read_all_domains_state(logwatch_t)
files_read_etc_files(logwatch_t)
files_read_etc_runtime_files(logwatch_t)
files_read_usr_files(logwatch_t)
files_search_spool(logwatch_t)
files_dontaudit_search_home(logwatch_t)
fs_getattr_all_fs(logwatch_t)
term_dontaudit_getattr_pty_dirs(logwatch_t)
term_dontaudit_list_ptys(logwatch_t)
auth_dontaudit_read_shadow(logwatch_t)
libs_use_ld_so(logwatch_t)
libs_use_shared_libs(logwatch_t)
libs_read_lib_files(logwatch_t)
logging_read_all_logs(logwatch_t)
miscfiles_read_localization(logwatch_t)
selinux_dontaudit_getattr_dir(logwatch_t)
sysnet_dns_name_resolve(logwatch_t)
userdom_dontaudit_search_sysadm_home_dirs(logwatch_t)
userdom_dontaudit_getattr_sysadm_home_dirs(logwatch_t)
mta_send_mail(logwatch_t)
optional_policy(`apache',`
apache_read_log(logwatch_t)
')
optional_policy(`bind',`
bind_read_config(logwatch_t)
bind_read_zone(logwatch_t)
')
optional_policy(`cron',`
cron_system_entry(logwatch_t, logwatch_exec_t)
')
optional_policy(`mta',`
mta_getattr_spool(logwatch_t)
')
optional_policy(`nscd',`
nscd_socket_use(logwatch_t)
')
optional_policy(`ntp',`
ntp_domtrans(logwatch_t)
')
optional_policy(`rpc',`
rpc_search_nfs_state_data(logwatch_t)
')
optional_policy(`samba',`
samba_read_log(logwatch_t)
')