Chris PeBenito 17de1b
Chris PeBenito 9570b2
policy_module(nagios, 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 nagios_t;
Chris PeBenito 17de1b
type nagios_exec_t;
Chris PeBenito 8242f5
init_daemon_domain(nagios_t, nagios_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type nagios_cgi_t;
Chris PeBenito 17de1b
type nagios_cgi_exec_t;
Chris PeBenito 8242f5
init_system_domain(nagios_cgi_t, nagios_cgi_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type nagios_etc_t;
Chris PeBenito 17de1b
files_config_file(nagios_etc_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type nagios_log_t;
Chris PeBenito 17de1b
logging_log_file(nagios_log_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type nagios_tmp_t;
Chris PeBenito 17de1b
files_tmp_file(nagios_tmp_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type nagios_var_run_t;
Chris PeBenito 17de1b
files_pid_file(nagios_var_run_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type nrpe_t;
Chris PeBenito 17de1b
type nrpe_exec_t;
Chris PeBenito 8242f5
init_daemon_domain(nrpe_t, nrpe_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type nrpe_etc_t;
Chris PeBenito 17de1b
files_config_file(nrpe_etc_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Nagios local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow nagios_t self:capability { dac_override setgid setuid };
Chris PeBenito 17de1b
dontaudit nagios_t self:capability sys_tty_config;
Chris PeBenito 17de1b
allow nagios_t self:process { setpgid signal_perms };
Chris PeBenito 17de1b
allow nagios_t self:fifo_file rw_file_perms;
Chris PeBenito 17de1b
allow nagios_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 17de1b
allow nagios_t self:udp_socket create_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito 8242f5
read_files_pattern(nagios_t, nagios_etc_t, nagios_etc_t)
Chris PeBenito 8242f5
read_lnk_files_pattern(nagios_t, nagios_etc_t, nagios_etc_t)
Chris PeBenito c0868a
allow nagios_t nagios_etc_t:dir list_dir_perms;
Chris PeBenito 17de1b
Chris PeBenito 8242f5
manage_files_pattern(nagios_t, nagios_log_t, nagios_log_t)
Chris PeBenito 8242f5
manage_fifo_files_pattern(nagios_t, nagios_log_t, nagios_log_t)
Chris PeBenito 8242f5
logging_log_filetrans(nagios_t, nagios_log_t, { file dir })
Chris PeBenito 17de1b
Chris PeBenito 8242f5
manage_dirs_pattern(nagios_t, nagios_tmp_t, nagios_tmp_t)
Chris PeBenito 8242f5
manage_files_pattern(nagios_t, nagios_tmp_t, nagios_tmp_t)
Chris PeBenito 17de1b
files_tmp_filetrans(nagios_t, nagios_tmp_t, { file dir })
Chris PeBenito 17de1b
Chris PeBenito 8242f5
manage_files_pattern(nagios_t, nagios_var_run_t, nagios_var_run_t)
Chris PeBenito 8242f5
files_pid_filetrans(nagios_t, nagios_var_run_t, file)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_system_state(nagios_t)
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(nagios_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
corecmd_exec_bin(nagios_t)
Chris PeBenito 17de1b
corecmd_exec_shell(nagios_t)
Chris PeBenito 17de1b
Chris PeBenito 190066
corenet_all_recvfrom_unlabeled(nagios_t)
Chris PeBenito 190066
corenet_all_recvfrom_netlabel(nagios_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_generic_if(nagios_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_generic_if(nagios_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(nagios_t)
Chris PeBenito c12621
corenet_udp_sendrecv_generic_node(nagios_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_ports(nagios_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_ports(nagios_t)
Chris PeBenito 02f2c3
corenet_tcp_connect_all_ports(nagios_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_sysfs(nagios_t)
Chris PeBenito 02f2c3
dev_read_urand(nagios_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(nagios_t)
Chris PeBenito 17de1b
# for ps
Chris PeBenito 17de1b
domain_read_all_domains_state(nagios_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(nagios_t)
Chris PeBenito 17de1b
files_read_etc_runtime_files(nagios_t)
Chris PeBenito 17de1b
files_read_kernel_symbol_table(nagios_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_getattr_all_fs(nagios_t)
Chris PeBenito 17de1b
fs_search_auto_mountpoints(nagios_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# for who
Chris PeBenito 17de1b
init_read_utmp(nagios_t)
Chris PeBenito 17de1b
Chris PeBenito c0cf6e
auth_use_nsswitch(nagios_t)
Chris PeBenito c0cf6e
Chris PeBenito 17de1b
logging_send_syslog_msg(nagios_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(nagios_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_dontaudit_use_unpriv_user_fds(nagios_t)
Chris PeBenito 296273
userdom_dontaudit_search_user_home_dirs(nagios_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
mta_send_mail(nagios_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 02f2c3
	netutils_domtrans_ping(nagios_t)
Chris PeBenito 02f2c3
	netutils_signal_ping(nagios_t)
Chris PeBenito 02f2c3
	netutils_kill_ping(nagios_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	seutil_sigchld_newrole(nagios_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	udev_read_db(nagios_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# cjp: leaked file descriptors:
Chris PeBenito 17de1b
# for open file handles
Chris PeBenito 17de1b
#dontaudit system_mail_t nagios_etc_t:file read;
Chris PeBenito 17de1b
#dontaudit system_mail_t nagios_log_t:fifo_file read;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Nagios CGI local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito c0868a
allow nagios_cgi_t self:process signal_perms;
Chris PeBenito c0868a
allow nagios_cgi_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito 17de1b
Chris PeBenito 8242f5
read_files_pattern(nagios_cgi_t, nagios_t, nagios_t)
Chris PeBenito 8242f5
read_lnk_files_pattern(nagios_cgi_t, nagios_t, nagios_t)
Chris PeBenito 17de1b
Chris PeBenito c0868a
allow nagios_cgi_t nagios_etc_t:dir list_dir_perms;
Chris PeBenito 8242f5
read_files_pattern(nagios_cgi_t, nagios_etc_t, nagios_etc_t)
Chris PeBenito 8242f5
read_lnk_files_pattern(nagios_cgi_t, nagios_etc_t, nagios_etc_t)
Chris PeBenito 17de1b
Chris PeBenito c0868a
allow nagios_cgi_t nagios_log_t:dir list_dir_perms;
Chris PeBenito 8242f5
read_files_pattern(nagios_cgi_t, nagios_etc_t, nagios_log_t)
Chris PeBenito 8242f5
read_lnk_files_pattern(nagios_cgi_t, nagios_etc_t, nagios_log_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_system_state(nagios_cgi_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
corecmd_exec_bin(nagios_cgi_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_dontaudit_read_all_domains_state(nagios_cgi_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(nagios_cgi_t)
Chris PeBenito 17de1b
files_read_etc_runtime_files(nagios_cgi_t)
Chris PeBenito 17de1b
files_read_kernel_symbol_table(nagios_cgi_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
logging_send_syslog_msg(nagios_cgi_t)
Chris PeBenito 17de1b
logging_search_logs(nagios_cgi_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(nagios_cgi_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	apache_append_log(nagios_cgi_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Nagios remote plugin executor local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dontaudit nrpe_t self:capability sys_tty_config;
Chris PeBenito 17de1b
allow nrpe_t self:process { setpgid signal_perms };
Chris PeBenito c0868a
allow nrpe_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito 17de1b
Chris PeBenito 0b36a2
allow nrpe_t nrpe_etc_t:file read_file_perms;
Chris PeBenito 17de1b
files_search_etc(nrpe_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_system_state(nrpe_t)
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(nrpe_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
corecmd_exec_bin(nrpe_t)
Chris PeBenito 17de1b
corecmd_exec_shell(nrpe_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_sysfs(nrpe_t)
Chris PeBenito 17de1b
dev_read_urand(nrpe_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(nrpe_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_runtime_files(nrpe_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_search_auto_mountpoints(nrpe_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
logging_send_syslog_msg(nrpe_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(nrpe_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_dontaudit_use_unpriv_user_fds(nrpe_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 8242f5
	inetd_tcp_service_domain(nrpe_t, nrpe_exec_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 6073ea
	seutil_sigchld_newrole(nrpe_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 8242f5
	tcpd_wrapped_domain(nrpe_t, nrpe_exec_t)
Chris PeBenito 8242f5
')
Chris PeBenito 8242f5
Chris PeBenito 8242f5
optional_policy(`
Chris PeBenito 6073ea
	udev_read_db(nrpe_t)
Chris PeBenito 17de1b
')