|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
a52b4d |
policy_module(mrtg,1.1.0)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
679626 |
########################################
|
|
Chris PeBenito |
679626 |
#
|
|
Chris PeBenito |
679626 |
# Declarations
|
|
Chris PeBenito |
679626 |
#
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
679626 |
type mrtg_t;
|
|
Chris PeBenito |
679626 |
type mrtg_exec_t;
|
|
Chris PeBenito |
679626 |
init_system_domain(mrtg_t,mrtg_exec_t)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
679626 |
type mrtg_etc_t;
|
|
Chris PeBenito |
679626 |
files_config_file(mrtg_etc_t)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
679626 |
type mrtg_lock_t;
|
|
Chris PeBenito |
679626 |
files_lock_file(mrtg_lock_t)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
679626 |
type mrtg_log_t;
|
|
Chris PeBenito |
679626 |
logging_log_file(mrtg_log_t)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
679626 |
type mrtg_var_lib_t;
|
|
Chris PeBenito |
679626 |
files_type(mrtg_var_lib_t)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
4846dc |
type mrtg_var_run_t;
|
|
Chris PeBenito |
4846dc |
files_pid_file(mrtg_var_run_t)
|
|
Chris PeBenito |
4846dc |
|
|
Chris PeBenito |
679626 |
########################################
|
|
Chris PeBenito |
679626 |
#
|
|
Chris PeBenito |
679626 |
# Local policy
|
|
Chris PeBenito |
679626 |
#
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
4846dc |
allow mrtg_t self:capability { setgid setuid chown };
|
|
Chris PeBenito |
679626 |
dontaudit mrtg_t self:capability sys_tty_config;
|
|
Chris PeBenito |
679626 |
allow mrtg_t self:process signal_perms;
|
|
Chris PeBenito |
679626 |
allow mrtg_t self:fifo_file { getattr read write ioctl };
|
|
Chris PeBenito |
679626 |
allow mrtg_t self:unix_stream_socket create_socket_perms;
|
|
Chris PeBenito |
679626 |
allow mrtg_t self:tcp_socket create_socket_perms;
|
|
Chris PeBenito |
679626 |
allow mrtg_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
c0868a |
allow mrtg_t mrtg_etc_t:dir list_dir_perms;
|
|
Chris PeBenito |
c0868a |
read_files_pattern(mrtg_t,mrtg_etc_t,mrtg_etc_t)
|
|
Chris PeBenito |
c0868a |
read_lnk_files_pattern(mrtg_t,mrtg_etc_t,mrtg_etc_t)
|
|
Chris PeBenito |
c0868a |
dontaudit mrtg_t mrtg_etc_t:dir write;
|
|
Chris PeBenito |
c0868a |
dontaudit mrtg_t mrtg_etc_t:file { write ioctl };
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
c0868a |
manage_files_pattern(mrtg_t,mrtg_lock_t,mrtg_lock_t)
|
|
Chris PeBenito |
c0868a |
manage_lnk_files_pattern(mrtg_t,mrtg_lock_t,mrtg_lock_t)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
c0868a |
manage_files_pattern(mrtg_t,mrtg_log_t,mrtg_log_t)
|
|
Chris PeBenito |
103fe2 |
logging_log_filetrans(mrtg_t,mrtg_log_t,{ file dir })
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
c0868a |
manage_files_pattern(mrtg_t,mrtg_var_lib_t,mrtg_var_lib_t)
|
|
Chris PeBenito |
c0868a |
manage_lnk_files_pattern(mrtg_t,mrtg_var_lib_t,mrtg_var_lib_t)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
4846dc |
allow mrtg_t mrtg_var_run_t:file manage_file_perms;
|
|
Chris PeBenito |
4846dc |
files_pid_filetrans(mrtg_t,mrtg_var_run_t,file)
|
|
Chris PeBenito |
4846dc |
|
|
Chris PeBenito |
679626 |
kernel_read_system_state(mrtg_t)
|
|
Chris PeBenito |
679626 |
kernel_read_network_state(mrtg_t)
|
|
Chris PeBenito |
679626 |
kernel_read_kernel_sysctls(mrtg_t)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
679626 |
corecmd_exec_bin(mrtg_t)
|
|
Chris PeBenito |
679626 |
corecmd_exec_shell(mrtg_t)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
679626 |
corenet_non_ipsec_sendrecv(mrtg_t)
|
|
Chris PeBenito |
679626 |
corenet_tcp_sendrecv_generic_if(mrtg_t)
|
|
Chris PeBenito |
679626 |
corenet_udp_sendrecv_generic_if(mrtg_t)
|
|
Chris PeBenito |
679626 |
corenet_tcp_sendrecv_all_nodes(mrtg_t)
|
|
Chris PeBenito |
679626 |
corenet_udp_sendrecv_all_nodes(mrtg_t)
|
|
Chris PeBenito |
679626 |
corenet_tcp_sendrecv_all_ports(mrtg_t)
|
|
Chris PeBenito |
679626 |
corenet_udp_sendrecv_all_ports(mrtg_t)
|
|
Chris PeBenito |
679626 |
corenet_tcp_connect_all_ports(mrtg_t)
|
|
Chris PeBenito |
9d0c9b |
corenet_sendrecv_all_client_packets(mrtg_t)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
679626 |
dev_read_sysfs(mrtg_t)
|
|
Chris PeBenito |
679626 |
dev_read_urand(mrtg_t)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
15722e |
domain_use_interactive_fds(mrtg_t)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
679626 |
files_read_usr_files(mrtg_t)
|
|
Chris PeBenito |
679626 |
files_search_var(mrtg_t)
|
|
Chris PeBenito |
679626 |
files_search_locks(mrtg_t)
|
|
Chris PeBenito |
679626 |
files_search_var_lib(mrtg_t)
|
|
Chris PeBenito |
679626 |
files_search_spool(mrtg_t)
|
|
Chris PeBenito |
679626 |
files_getattr_tmp_dirs(mrtg_t)
|
|
Chris PeBenito |
679626 |
# for uptime
|
|
Chris PeBenito |
679626 |
files_read_etc_runtime_files(mrtg_t)
|
|
Chris PeBenito |
c0868a |
# read config files
|
|
Chris PeBenito |
c0868a |
files_read_etc_files(mrtg_t)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
679626 |
fs_search_auto_mountpoints(mrtg_t)
|
|
Chris PeBenito |
679626 |
fs_getattr_xattr_fs(mrtg_t)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
679626 |
term_dontaudit_use_console(mrtg_t)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
1c1ac6 |
init_use_fds(mrtg_t)
|
|
Chris PeBenito |
1815ba |
init_use_script_ptys(mrtg_t)
|
|
Chris PeBenito |
679626 |
# for uptime
|
|
Chris PeBenito |
679626 |
init_read_utmp(mrtg_t)
|
|
Chris PeBenito |
679626 |
init_dontaudit_write_utmp(mrtg_t)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
1815ba |
libs_read_lib_files(mrtg_t)
|
|
Chris PeBenito |
679626 |
libs_use_ld_so(mrtg_t)
|
|
Chris PeBenito |
679626 |
libs_use_shared_libs(mrtg_t)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
679626 |
logging_send_syslog_msg(mrtg_t)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
679626 |
miscfiles_read_localization(mrtg_t)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
679626 |
selinux_dontaudit_getattr_dir(mrtg_t)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
679626 |
# Use the network.
|
|
Chris PeBenito |
679626 |
sysnet_read_config(mrtg_t)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
15722e |
userdom_dontaudit_use_unpriv_user_fds(mrtg_t)
|
|
Chris PeBenito |
679626 |
userdom_use_sysadm_terms(mrtg_t)
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
4846dc |
ifdef(`enable_mls',`
|
|
Chris PeBenito |
4846dc |
corenet_udp_sendrecv_lo_if(mrtg_t)
|
|
Chris PeBenito |
4846dc |
')
|
|
Chris PeBenito |
4846dc |
|
|
Chris PeBenito |
679626 |
ifdef(`distro_redhat',`
|
|
Chris PeBenito |
c0868a |
allow mrtg_t mrtg_lock_t:file manage_file_perms;
|
|
Chris PeBenito |
c0868a |
filetrans_pattern(mrtg_t,mrtg_etc_t,mrtg_lock_t,file)
|
|
Chris PeBenito |
679626 |
')
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
679626 |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
1815ba |
term_dontaudit_use_unallocated_ttys(mrtg_t)
|
|
Chris PeBenito |
1815ba |
term_dontaudit_use_generic_ptys(mrtg_t)
|
|
Chris PeBenito |
679626 |
files_dontaudit_read_root_files(mrtg_t)
|
|
Chris PeBenito |
679626 |
')
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
679626 |
apache_manage_sys_content(mrtg_t)
|
|
Chris PeBenito |
679626 |
')
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
679626 |
cron_system_entry(mrtg_t,mrtg_exec_t)
|
|
Chris PeBenito |
679626 |
')
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
679626 |
hostname_exec(mrtg_t)
|
|
Chris PeBenito |
679626 |
')
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
679626 |
nis_use_ypbind(mrtg_t)
|
|
Chris PeBenito |
679626 |
')
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
4846dc |
nscd_dontaudit_search_pid(mrtg_t)
|
|
Chris PeBenito |
4846dc |
')
|
|
Chris PeBenito |
4846dc |
|
|
Chris PeBenito |
4846dc |
optional_policy(`
|
|
Chris PeBenito |
679626 |
seutil_sigchld_newrole(mrtg_t)
|
|
Chris PeBenito |
679626 |
')
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
679626 |
quota_dontaudit_getattr_db(mrtg_t)
|
|
Chris PeBenito |
679626 |
')
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
1815ba |
snmp_read_snmp_var_lib_files(mrtg_t)
|
|
Chris PeBenito |
679626 |
')
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
679626 |
udev_read_db(mrtg_t)
|
|
Chris PeBenito |
679626 |
')
|
|
Chris PeBenito |
679626 |
|
|
Chris PeBenito |
679626 |
ifdef(`TODO',`
|
|
Chris PeBenito |
679626 |
# should not need this!
|
|
Chris PeBenito |
679626 |
dontaudit mrtg_t { staff_home_dir_t sysadm_home_dir_t }:dir { search read getattr };
|
|
Chris PeBenito |
679626 |
dontaudit mrtg_t { boot_t device_t file_t lost_found_t }:dir getattr;
|
|
Chris PeBenito |
679626 |
dontaudit mrtg_t root_t:lnk_file getattr;
|
|
Chris PeBenito |
679626 |
')
|