Chris PeBenito b6d37e
Chris PeBenito b6d37e
policy_module(munin,1.0.0)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
########################################
Chris PeBenito b6d37e
#
Chris PeBenito b6d37e
# Declarations
Chris PeBenito b6d37e
#
Chris PeBenito b6d37e
Chris PeBenito b6d37e
type munin_t alias lrrd_t;
Chris PeBenito b6d37e
type munin_exec_t alias lrrd_exec_t;
Chris PeBenito b6d37e
init_daemon_domain(munin_t,munin_exec_t)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
type munin_etc_t alias lrrd_etc_t;
Chris PeBenito b6d37e
files_config_file(munin_etc_t)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
type munin_log_t alias lrrd_log_t;
Chris PeBenito b6d37e
logging_log_file(munin_log_t)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
type munin_tmp_t alias lrrd_tmp_t;
Chris PeBenito b6d37e
files_tmp_file(munin_tmp_t)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
type munin_var_lib_t alias lrrd_var_lib_t;
Chris PeBenito b6d37e
files_type(munin_var_lib_t)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
type munin_var_run_t alias lrrd_var_run_t;
Chris PeBenito b6d37e
files_pid_file(munin_var_run_t)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
########################################
Chris PeBenito b6d37e
#
Chris PeBenito b6d37e
# Local policy
Chris PeBenito b6d37e
#
Chris PeBenito b6d37e
Chris PeBenito b6d37e
allow munin_t self:capability { setgid setuid };
Chris PeBenito b6d37e
dontaudit munin_t self:capability sys_tty_config;
Chris PeBenito b6d37e
allow munin_t self:process { getsched setsched signal_perms };
Chris PeBenito b6d37e
allow munin_t self:unix_stream_socket { create_stream_socket_perms connectto };
Chris PeBenito b6d37e
allow munin_t self:unix_dgram_socket { create_socket_perms sendto };
Chris PeBenito b6d37e
allow munin_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito b6d37e
allow munin_t self:udp_socket create_socket_perms;
Chris PeBenito b6d37e
Chris PeBenito b6d37e
allow munin_t munin_etc_t:file r_file_perms;
Chris PeBenito b6d37e
allow munin_t munin_etc_t:dir r_dir_perms;
Chris PeBenito b6d37e
allow munin_t munin_etc_t:lnk_file { getattr read };
Chris PeBenito b6d37e
files_search_etc(munin_t)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
allow munin_t munin_log_t:file create_file_perms;
Chris PeBenito b6d37e
logging_log_filetrans(munin_t,munin_log_t,file)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
allow munin_t munin_tmp_t:dir create_dir_perms;
Chris PeBenito b6d37e
allow munin_t munin_tmp_t:file create_file_perms;
Chris PeBenito b6d37e
files_tmp_filetrans(munin_t, munin_tmp_t, { file dir })
Chris PeBenito b6d37e
Chris PeBenito b6d37e
# Allow access to the munin databases
Chris PeBenito b6d37e
allow munin_t munin_var_lib_t:dir create_dir_perms;
Chris PeBenito b6d37e
allow munin_t munin_var_lib_t:file create_file_perms;
Chris PeBenito b6d37e
allow munin_t munin_var_lib_t:lnk_file create_lnk_perms;
Chris PeBenito b6d37e
files_search_var_lib(munin_t)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
allow munin_t munin_var_run_t:sock_file manage_file_perms;
Chris PeBenito b6d37e
allow munin_t munin_var_run_t:file manage_file_perms;
Chris PeBenito b6d37e
allow munin_t munin_var_run_t:dir rw_dir_perms;
Chris PeBenito b6d37e
files_pid_filetrans(munin_t,munin_var_run_t,file)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
kernel_read_system_state(munin_t)
Chris PeBenito b6d37e
kernel_read_kernel_sysctls(munin_t)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
corecmd_exec_bin(munin_t)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
corenet_tcp_sendrecv_generic_if(munin_t)
Chris PeBenito b6d37e
corenet_udp_sendrecv_generic_if(munin_t)
Chris PeBenito b6d37e
corenet_raw_sendrecv_generic_if(munin_t)
Chris PeBenito b6d37e
corenet_tcp_sendrecv_all_nodes(munin_t)
Chris PeBenito b6d37e
corenet_udp_sendrecv_all_nodes(munin_t)
Chris PeBenito b6d37e
corenet_raw_sendrecv_all_nodes(munin_t)
Chris PeBenito b6d37e
corenet_tcp_sendrecv_all_ports(munin_t)
Chris PeBenito b6d37e
corenet_udp_sendrecv_all_ports(munin_t)
Chris PeBenito b6d37e
corenet_non_ipsec_sendrecv(munin_t)
Chris PeBenito b6d37e
corenet_tcp_bind_all_nodes(munin_t)
Chris PeBenito b6d37e
corenet_udp_bind_all_nodes(munin_t)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
dev_read_sysfs(munin_t)
Chris PeBenito b6d37e
dev_read_urand(munin_t)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
domain_use_interactive_fds(munin_t)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
files_read_etc_files(munin_t)
Chris PeBenito b6d37e
files_read_etc_runtime_files(munin_t)
Chris PeBenito b6d37e
files_read_usr_files(munin_t)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
fs_getattr_all_fs(munin_t)
Chris PeBenito b6d37e
fs_search_auto_mountpoints(munin_t)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
term_dontaudit_use_console(munin_t)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
init_use_fds(munin_t)
Chris PeBenito b6d37e
init_use_script_ptys(munin_t)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
libs_use_ld_so(munin_t)
Chris PeBenito b6d37e
libs_use_shared_libs(munin_t)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
logging_send_syslog_msg(munin_t)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
miscfiles_read_localization(munin_t)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
sysnet_read_config(munin_t)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
userdom_dontaudit_use_unpriv_user_fds(munin_t)
Chris PeBenito b6d37e
userdom_dontaudit_search_sysadm_home_dirs(munin_t)
Chris PeBenito b6d37e
Chris PeBenito b6d37e
ifdef(`targeted_policy',`
Chris PeBenito b6d37e
	term_dontaudit_use_unallocated_ttys(munin_t)
Chris PeBenito b6d37e
	term_dontaudit_use_generic_ptys(munin_t)
Chris PeBenito b6d37e
	files_dontaudit_read_root_files(munin_t)
Chris PeBenito b6d37e
')
Chris PeBenito b6d37e
Chris PeBenito b6d37e
optional_policy(`
Chris PeBenito b6d37e
	# for accessing the output directory
Chris PeBenito b6d37e
	apache_search_sys_content(munin_t)
Chris PeBenito b6d37e
')
Chris PeBenito b6d37e
Chris PeBenito b6d37e
optional_policy(`
Chris PeBenito b6d37e
	cron_system_entry(munin_t,munin_exec_t)
Chris PeBenito b6d37e
')
Chris PeBenito b6d37e
Chris PeBenito b6d37e
optional_policy(`
Chris PeBenito b6d37e
	nis_use_ypbind(munin_t)
Chris PeBenito b6d37e
')
Chris PeBenito b6d37e
Chris PeBenito b6d37e
optional_policy(`
Chris PeBenito b6d37e
	seutil_sigchld_newrole(munin_t)
Chris PeBenito b6d37e
')
Chris PeBenito b6d37e
Chris PeBenito b6d37e
optional_policy(`
Chris PeBenito b6d37e
	udev_read_db(munin_t)
Chris PeBenito b6d37e
')