selinux-policy/policy/modules/admin/mrtg.te

156 lines
3.5 KiB
Plaintext
Raw Normal View History

2006-01-31 21:43:09 +00:00
2008-11-05 16:10:46 +00:00
policy_module(mrtg, 1.5.1)
2006-01-31 21:43:09 +00:00
########################################
#
# Declarations
#
type mrtg_t;
type mrtg_exec_t;
init_system_domain(mrtg_t, mrtg_exec_t)
2006-01-31 21:43:09 +00:00
type mrtg_etc_t;
files_config_file(mrtg_etc_t)
type mrtg_lock_t;
files_lock_file(mrtg_lock_t)
type mrtg_log_t;
logging_log_file(mrtg_log_t)
type mrtg_var_lib_t;
files_type(mrtg_var_lib_t)
type mrtg_var_run_t;
files_pid_file(mrtg_var_run_t)
2006-01-31 21:43:09 +00:00
########################################
#
# Local policy
#
allow mrtg_t self:capability { setgid setuid chown };
2006-01-31 21:43:09 +00:00
dontaudit mrtg_t self:capability sys_tty_config;
allow mrtg_t self:process signal_perms;
allow mrtg_t self:fifo_file rw_fifo_file_perms;
2006-01-31 21:43:09 +00:00
allow mrtg_t self:unix_stream_socket create_socket_perms;
allow mrtg_t self:tcp_socket create_socket_perms;
allow mrtg_t self:udp_socket create_socket_perms;
2006-12-12 20:08:08 +00:00
allow mrtg_t mrtg_etc_t:dir list_dir_perms;
read_files_pattern(mrtg_t, mrtg_etc_t, mrtg_etc_t)
read_lnk_files_pattern(mrtg_t, mrtg_etc_t, mrtg_etc_t)
2006-12-12 20:08:08 +00:00
dontaudit mrtg_t mrtg_etc_t:dir write;
dontaudit mrtg_t mrtg_etc_t:file { write ioctl };
2006-01-31 21:43:09 +00:00
manage_files_pattern(mrtg_t, mrtg_lock_t, mrtg_lock_t)
manage_lnk_files_pattern(mrtg_t, mrtg_lock_t, mrtg_lock_t)
2006-01-31 21:43:09 +00:00
manage_files_pattern(mrtg_t, mrtg_log_t, mrtg_log_t)
logging_log_filetrans(mrtg_t, mrtg_log_t, { file dir })
2006-01-31 21:43:09 +00:00
manage_files_pattern(mrtg_t, mrtg_var_lib_t, mrtg_var_lib_t)
manage_lnk_files_pattern(mrtg_t, mrtg_var_lib_t, mrtg_var_lib_t)
2006-01-31 21:43:09 +00:00
allow mrtg_t mrtg_var_run_t:file manage_file_perms;
files_pid_filetrans(mrtg_t,mrtg_var_run_t,file)
2006-01-31 21:43:09 +00:00
kernel_read_system_state(mrtg_t)
kernel_read_network_state(mrtg_t)
kernel_read_kernel_sysctls(mrtg_t)
corecmd_exec_bin(mrtg_t)
corecmd_exec_shell(mrtg_t)
corenet_all_recvfrom_unlabeled(mrtg_t)
corenet_all_recvfrom_netlabel(mrtg_t)
2006-01-31 21:43:09 +00:00
corenet_tcp_sendrecv_generic_if(mrtg_t)
corenet_udp_sendrecv_generic_if(mrtg_t)
corenet_tcp_sendrecv_all_nodes(mrtg_t)
corenet_udp_sendrecv_all_nodes(mrtg_t)
corenet_tcp_sendrecv_all_ports(mrtg_t)
corenet_udp_sendrecv_all_ports(mrtg_t)
corenet_tcp_connect_all_ports(mrtg_t)
2006-05-29 19:53:43 +00:00
corenet_sendrecv_all_client_packets(mrtg_t)
2006-01-31 21:43:09 +00:00
dev_read_sysfs(mrtg_t)
dev_read_urand(mrtg_t)
2006-02-20 21:33:25 +00:00
domain_use_interactive_fds(mrtg_t)
2008-10-13 15:06:23 +00:00
domain_dontaudit_search_all_domains_state(mrtg_t)
2006-01-31 21:43:09 +00:00
files_read_usr_files(mrtg_t)
files_search_var(mrtg_t)
files_search_locks(mrtg_t)
files_search_var_lib(mrtg_t)
files_search_spool(mrtg_t)
files_getattr_tmp_dirs(mrtg_t)
# for uptime
files_read_etc_runtime_files(mrtg_t)
2006-12-12 20:08:08 +00:00
# read config files
files_read_etc_files(mrtg_t)
2006-01-31 21:43:09 +00:00
fs_search_auto_mountpoints(mrtg_t)
fs_getattr_xattr_fs(mrtg_t)
2008-10-13 15:06:23 +00:00
fs_list_inotifyfs(mrtg_t)
2006-01-31 21:43:09 +00:00
term_dontaudit_use_console(mrtg_t)
init_use_fds(mrtg_t)
2006-02-02 21:08:12 +00:00
init_use_script_ptys(mrtg_t)
2006-01-31 21:43:09 +00:00
# for uptime
init_read_utmp(mrtg_t)
init_dontaudit_write_utmp(mrtg_t)
2008-10-13 15:06:23 +00:00
auth_use_nsswitch(mrtg_t)
2006-02-02 21:08:12 +00:00
libs_read_lib_files(mrtg_t)
2006-01-31 21:43:09 +00:00
logging_send_syslog_msg(mrtg_t)
miscfiles_read_localization(mrtg_t)
selinux_dontaudit_getattr_dir(mrtg_t)
2008-11-05 16:10:46 +00:00
userdom_use_user_terminals(mrtg_t)
userdom_dontaudit_read_user_home_content_files(mrtg_t)
2006-02-20 21:33:25 +00:00
userdom_dontaudit_use_unpriv_user_fds(mrtg_t)
ifdef(`enable_mls',`
corenet_udp_sendrecv_lo_if(mrtg_t)
')
2006-01-31 21:43:09 +00:00
ifdef(`distro_redhat',`
2006-12-12 20:08:08 +00:00
allow mrtg_t mrtg_lock_t:file manage_file_perms;
filetrans_pattern(mrtg_t, mrtg_etc_t, mrtg_lock_t, file)
2006-01-31 21:43:09 +00:00
')
optional_policy(`
2006-01-31 21:43:09 +00:00
apache_manage_sys_content(mrtg_t)
')
optional_policy(`
cron_system_entry(mrtg_t, mrtg_exec_t)
2006-01-31 21:43:09 +00:00
')
optional_policy(`
2006-01-31 21:43:09 +00:00
hostname_exec(mrtg_t)
')
optional_policy(`
2006-01-31 21:43:09 +00:00
seutil_sigchld_newrole(mrtg_t)
')
optional_policy(`
2006-01-31 21:43:09 +00:00
quota_dontaudit_getattr_db(mrtg_t)
')
optional_policy(`
2006-02-02 21:08:12 +00:00
snmp_read_snmp_var_lib_files(mrtg_t)
2006-01-31 21:43:09 +00:00
')
optional_policy(`
2006-01-31 21:43:09 +00:00
udev_read_db(mrtg_t)
')