Chris PeBenito 29af4c
policy_module(munin, 1.8.0)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type munin_t alias lrrd_t;
Chris PeBenito 17de1b
type munin_exec_t alias lrrd_exec_t;
Chris PeBenito 0bfccd
init_daemon_domain(munin_t, munin_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type munin_etc_t alias lrrd_etc_t;
Chris PeBenito 17de1b
files_config_file(munin_etc_t)
Chris PeBenito 17de1b
Chris PeBenito ce6fee
type munin_initrc_exec_t;
Chris PeBenito ce6fee
init_script_file(munin_initrc_exec_t)
Chris PeBenito ce6fee
Chris PeBenito 17de1b
type munin_log_t alias lrrd_log_t;
Chris PeBenito 17de1b
logging_log_file(munin_log_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type munin_tmp_t alias lrrd_tmp_t;
Chris PeBenito 17de1b
files_tmp_file(munin_tmp_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type munin_var_lib_t alias lrrd_var_lib_t;
Chris PeBenito 17de1b
files_type(munin_var_lib_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type munin_var_run_t alias lrrd_var_run_t;
Chris PeBenito 17de1b
files_pid_file(munin_var_run_t)
Chris PeBenito 17de1b
Chris PeBenito 24e0b9
munin_plugin_template(disk)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
munin_plugin_template(mail)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
munin_plugin_template(services)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
munin_plugin_template(system)
Chris PeBenito 24e0b9
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito ce6fee
allow munin_t self:capability { chown dac_override setgid setuid };
Chris PeBenito 17de1b
dontaudit munin_t self:capability sys_tty_config;
Chris PeBenito 17de1b
allow munin_t self:process { getsched setsched signal_perms };
Chris PeBenito 17de1b
allow munin_t self:unix_stream_socket { create_stream_socket_perms connectto };
Chris PeBenito 17de1b
allow munin_t self:unix_dgram_socket { create_socket_perms sendto };
Chris PeBenito 17de1b
allow munin_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 17de1b
allow munin_t self:udp_socket create_socket_perms;
Chris PeBenito ce6fee
allow munin_t self:fifo_file manage_fifo_file_perms;
Chris PeBenito 17de1b
Chris PeBenito c0868a
allow munin_t munin_etc_t:dir list_dir_perms;
Chris PeBenito 0bfccd
read_files_pattern(munin_t, munin_etc_t, munin_etc_t)
Chris PeBenito 0bfccd
read_lnk_files_pattern(munin_t, munin_etc_t, munin_etc_t)
Chris PeBenito 17de1b
files_search_etc(munin_t)
Chris PeBenito 17de1b
Chris PeBenito ce6fee
can_exec(munin_t, munin_exec_t)
Chris PeBenito ce6fee
Chris PeBenito ce6fee
manage_dirs_pattern(munin_t, munin_log_t, munin_log_t)
Chris PeBenito ce6fee
manage_files_pattern(munin_t, munin_log_t, munin_log_t)
Chris PeBenito ce6fee
logging_log_filetrans(munin_t, munin_log_t, { file dir })
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_dirs_pattern(munin_t, munin_tmp_t, munin_tmp_t)
Chris PeBenito 0bfccd
manage_files_pattern(munin_t, munin_tmp_t, munin_tmp_t)
Chris PeBenito 24e0b9
manage_sock_files_pattern(munin_t, munin_tmp_t, munin_tmp_t)
Chris PeBenito 24e0b9
files_tmp_filetrans(munin_t, munin_tmp_t, { file dir sock_file })
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# Allow access to the munin databases
Chris PeBenito 0bfccd
manage_dirs_pattern(munin_t, munin_var_lib_t, munin_var_lib_t)
Chris PeBenito 0bfccd
manage_files_pattern(munin_t, munin_var_lib_t, munin_var_lib_t)
Chris PeBenito 0bfccd
manage_lnk_files_pattern(munin_t, munin_var_lib_t, munin_var_lib_t)
Chris PeBenito 17de1b
files_search_var_lib(munin_t)
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_files_pattern(munin_t, munin_var_run_t, munin_var_run_t)
Chris PeBenito 0bfccd
manage_sock_files_pattern(munin_t, munin_var_run_t, munin_var_run_t)
Chris PeBenito 0bfccd
files_pid_filetrans(munin_t, munin_var_run_t, file)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_system_state(munin_t)
Chris PeBenito ce6fee
kernel_read_network_state(munin_t)
Chris PeBenito ce6fee
kernel_read_all_sysctls(munin_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
corecmd_exec_bin(munin_t)
Chris PeBenito ce6fee
corecmd_exec_shell(munin_t)
Chris PeBenito 17de1b
Chris PeBenito 190066
corenet_all_recvfrom_unlabeled(munin_t)
Chris PeBenito 190066
corenet_all_recvfrom_netlabel(munin_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_generic_if(munin_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_generic_if(munin_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(munin_t)
Chris PeBenito c12621
corenet_udp_sendrecv_generic_node(munin_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_ports(munin_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_ports(munin_t)
Chris PeBenito ce6fee
corenet_tcp_bind_generic_node(munin_t)
Chris PeBenito ce6fee
corenet_tcp_bind_munin_port(munin_t)
Chris PeBenito ce6fee
corenet_tcp_connect_munin_port(munin_t)
Chris PeBenito ce6fee
corenet_tcp_connect_http_port(munin_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_sysfs(munin_t)
Chris PeBenito 17de1b
dev_read_urand(munin_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(munin_t)
Chris PeBenito ce6fee
domain_read_all_domains_state(munin_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(munin_t)
Chris PeBenito 17de1b
files_read_etc_runtime_files(munin_t)
Chris PeBenito 17de1b
files_read_usr_files(munin_t)
Chris PeBenito ce6fee
files_list_spool(munin_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_getattr_all_fs(munin_t)
Chris PeBenito 17de1b
fs_search_auto_mountpoints(munin_t)
Chris PeBenito 17de1b
Chris PeBenito ce6fee
auth_use_nsswitch(munin_t)
Chris PeBenito ce6fee
Chris PeBenito 17de1b
logging_send_syslog_msg(munin_t)
Chris PeBenito ce6fee
logging_read_all_logs(munin_t)
Chris PeBenito 17de1b
Chris PeBenito ce6fee
miscfiles_read_fonts(munin_t)
Chris PeBenito 17de1b
miscfiles_read_localization(munin_t)
Chris PeBenito 17de1b
Chris PeBenito ce6fee
sysnet_exec_ifconfig(munin_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_dontaudit_use_unpriv_user_fds(munin_t)
Chris PeBenito 296273
userdom_dontaudit_search_user_home_dirs(munin_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito ce6fee
	apache_content_template(munin)
Chris PeBenito ce6fee
Chris PeBenito ce6fee
	manage_dirs_pattern(munin_t, httpd_munin_content_t, httpd_munin_content_t)
Chris PeBenito ce6fee
	manage_files_pattern(munin_t, httpd_munin_content_t, httpd_munin_content_t)
Chris PeBenito 17de1b
	apache_search_sys_content(munin_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 3f67f7
	cron_system_entry(munin_t, munin_exec_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito ce6fee
	fstools_domtrans(munin_t)
Chris PeBenito ce6fee
')
Chris PeBenito ce6fee
Chris PeBenito ce6fee
optional_policy(`
Chris PeBenito 24e0b9
	lpd_domtrans_lpr(munin_t)
Chris PeBenito 24e0b9
')
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
optional_policy(`
Chris PeBenito ce6fee
	mta_read_config(munin_t)
Chris PeBenito ce6fee
	mta_send_mail(munin_t)
Chris PeBenito ce6fee
	mta_read_queue(munin_t)
Chris PeBenito ce6fee
')
Chris PeBenito ce6fee
Chris PeBenito ce6fee
optional_policy(`
Chris PeBenito ce6fee
	mysql_read_config(munin_t)
Chris PeBenito ce6fee
	mysql_stream_connect(munin_t)
Chris PeBenito ce6fee
')
Chris PeBenito ce6fee
Chris PeBenito ce6fee
optional_policy(`
Chris PeBenito ce6fee
	netutils_domtrans_ping(munin_t)
Chris PeBenito ce6fee
')
Chris PeBenito ce6fee
Chris PeBenito ce6fee
optional_policy(`
Chris PeBenito ce6fee
	postfix_list_spool(munin_t)
Chris PeBenito ce6fee
')
Chris PeBenito ce6fee
Chris PeBenito ce6fee
optional_policy(`
Chris PeBenito ce6fee
	rpc_search_nfs_state_data(munin_t)
Chris PeBenito ce6fee
')
Chris PeBenito ce6fee
Chris PeBenito ce6fee
optional_policy(`
Chris PeBenito ce6fee
	sendmail_read_log(munin_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	seutil_sigchld_newrole(munin_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	udev_read_db(munin_t)
Chris PeBenito 17de1b
')
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
###################################
Chris PeBenito 24e0b9
#
Chris PeBenito 24e0b9
# local policy for disk plugins
Chris PeBenito 24e0b9
#
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
allow disk_munin_plugin_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
rw_files_pattern(disk_munin_plugin_t, munin_var_lib_t, munin_var_lib_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
corecmd_exec_shell(disk_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
corenet_tcp_connect_hddtemp_port(disk_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
files_read_etc_files(disk_munin_plugin_t)
Chris PeBenito 24e0b9
files_read_etc_runtime_files(disk_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
fs_getattr_all_fs(disk_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
dev_read_sysfs(disk_munin_plugin_t)
Chris PeBenito 24e0b9
dev_read_urand(disk_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
storage_getattr_fixed_disk_dev(disk_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
sysnet_read_config(disk_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
optional_policy(`
Chris PeBenito 24e0b9
	hddtemp_exec(disk_munin_plugin_t)
Chris PeBenito 24e0b9
')
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
optional_policy(`
Chris PeBenito 24e0b9
	fstools_exec(disk_munin_plugin_t)
Chris PeBenito 24e0b9
')
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
####################################
Chris PeBenito 24e0b9
#
Chris PeBenito 24e0b9
# local policy for mail plugins
Chris PeBenito 24e0b9
#
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
allow mail_munin_plugin_t self:capability dac_override;
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
rw_files_pattern(mail_munin_plugin_t, munin_var_lib_t, munin_var_lib_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
dev_read_urand(mail_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
files_read_etc_files(mail_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
fs_getattr_all_fs(mail_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
logging_read_generic_logs(mail_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
mta_read_config(mail_munin_plugin_t)
Chris PeBenito 24e0b9
mta_send_mail(mail_munin_plugin_t)
Chris PeBenito 24e0b9
mta_read_queue(mail_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
optional_policy(`
Chris PeBenito 24e0b9
	postfix_read_config(mail_munin_plugin_t)
Chris PeBenito 24e0b9
	postfix_list_spool(mail_munin_plugin_t)
Chris PeBenito 24e0b9
')
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
optional_policy(`
Chris PeBenito 24e0b9
	sendmail_read_log(mail_munin_plugin_t)
Chris PeBenito 24e0b9
')
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
###################################
Chris PeBenito 24e0b9
#
Chris PeBenito 24e0b9
# local policy for service plugins
Chris PeBenito 24e0b9
#
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
allow services_munin_plugin_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 24e0b9
allow services_munin_plugin_t self:udp_socket create_socket_perms;
Chris PeBenito 24e0b9
allow services_munin_plugin_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
corenet_tcp_connect_all_ports(services_munin_plugin_t)
Chris PeBenito 24e0b9
corenet_tcp_connect_http_port(services_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
dev_read_urand(services_munin_plugin_t)
Chris PeBenito 24e0b9
dev_read_rand(services_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
fs_getattr_all_fs(services_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
files_read_etc_files(services_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
sysnet_read_config(services_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
optional_policy(`
Chris PeBenito 24e0b9
	cups_stream_connect(services_munin_plugin_t)
Chris PeBenito 24e0b9
')
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
optional_policy(`
Chris PeBenito 24e0b9
	lpd_exec_lpr(services_munin_plugin_t)
Chris PeBenito 24e0b9
')
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
optional_policy(`
Chris PeBenito 24e0b9
	mysql_read_config(services_munin_plugin_t)
Chris PeBenito 24e0b9
	mysql_stream_connect(services_munin_plugin_t)
Chris PeBenito 24e0b9
')
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
optional_policy(`
Chris PeBenito 24e0b9
	netutils_domtrans_ping(services_munin_plugin_t)
Chris PeBenito 24e0b9
')
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
optional_policy(`
Chris PeBenito 24e0b9
	postgresql_stream_connect(services_munin_plugin_t)
Chris PeBenito 24e0b9
')
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
optional_policy(`
Chris PeBenito 24e0b9
	snmp_read_snmp_var_lib_files(services_munin_plugin_t)
Chris PeBenito 24e0b9
')
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
##################################
Chris PeBenito 24e0b9
#
Chris PeBenito 24e0b9
# local policy for system plugins
Chris PeBenito 24e0b9
#
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
allow system_munin_plugin_t self:udp_socket create_socket_perms;
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
rw_files_pattern(system_munin_plugin_t, munin_var_lib_t, munin_var_lib_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
kernel_read_network_state(system_munin_plugin_t)
Chris PeBenito 24e0b9
kernel_read_all_sysctls(system_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
corecmd_exec_shell(system_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
fs_getattr_all_fs(system_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
dev_read_sysfs(system_munin_plugin_t)
Chris PeBenito 24e0b9
dev_read_urand(system_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
domain_read_all_domains_state(system_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
# needed by users plugin
Chris PeBenito 24e0b9
init_read_utmp(system_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
sysnet_exec_ifconfig(system_munin_plugin_t)
Chris PeBenito 24e0b9
Chris PeBenito 24e0b9
term_getattr_unallocated_ttys(system_munin_plugin_t)