Module version bump for 1184392 and more.
* module version bump * make apache and unconfined portions optiona * rearrange lines
This commit is contained in:
parent
ca28376c4d
commit
7934ac10d3
|
@ -1,5 +1,5 @@
|
|||
|
||||
policy_module(nagios, 1.8.0)
|
||||
policy_module(nagios, 1.8.1)
|
||||
|
||||
########################################
|
||||
#
|
||||
|
@ -33,12 +33,11 @@ nagios_plugin_template(checkdisk)
|
|||
nagios_plugin_template(mail)
|
||||
nagios_plugin_template(services)
|
||||
nagios_plugin_template(system)
|
||||
nagios_plugin_template(unconfined)
|
||||
|
||||
type nagios_system_plugin_tmp_t;
|
||||
files_tmp_file(nagios_system_plugin_tmp_t)
|
||||
|
||||
nagios_plugin_template(unconfined)
|
||||
|
||||
type nrpe_t;
|
||||
type nrpe_exec_t;
|
||||
init_daemon_domain(nrpe_t, nrpe_exec_t)
|
||||
|
@ -49,10 +48,6 @@ files_config_file(nrpe_etc_t)
|
|||
type nrpe_var_run_t;
|
||||
files_pid_file(nrpe_var_run_t)
|
||||
|
||||
optional_policy(`
|
||||
unconfined_domain(nagios_unconfined_plugin_t)
|
||||
')
|
||||
|
||||
########################################
|
||||
#
|
||||
# Nagios local policy
|
||||
|
@ -149,34 +144,36 @@ optional_policy(`
|
|||
#
|
||||
# Nagios CGI local policy
|
||||
#
|
||||
apache_content_template(nagios)
|
||||
typealias httpd_nagios_script_t alias nagios_cgi_t;
|
||||
typealias httpd_nagios_script_exec_t alias nagios_cgi_exec_t;
|
||||
optional_policy(`
|
||||
apache_content_template(nagios)
|
||||
typealias httpd_nagios_script_t alias nagios_cgi_t;
|
||||
typealias httpd_nagios_script_exec_t alias nagios_cgi_exec_t;
|
||||
|
||||
allow httpd_nagios_script_t self:process signal_perms;
|
||||
allow httpd_nagios_script_t self:process signal_perms;
|
||||
|
||||
read_files_pattern(httpd_nagios_script_t, nagios_t, nagios_t)
|
||||
read_lnk_files_pattern(httpd_nagios_script_t, nagios_t, nagios_t)
|
||||
read_files_pattern(httpd_nagios_script_t, nagios_t, nagios_t)
|
||||
read_lnk_files_pattern(httpd_nagios_script_t, nagios_t, nagios_t)
|
||||
|
||||
files_search_spool(httpd_nagios_script_t)
|
||||
rw_fifo_files_pattern(httpd_nagios_script_t, nagios_spool_t, nagios_spool_t)
|
||||
files_search_spool(httpd_nagios_script_t)
|
||||
rw_fifo_files_pattern(httpd_nagios_script_t, nagios_spool_t, nagios_spool_t)
|
||||
|
||||
allow httpd_nagios_script_t nagios_etc_t:dir list_dir_perms;
|
||||
read_files_pattern(httpd_nagios_script_t, nagios_etc_t, nagios_etc_t)
|
||||
read_lnk_files_pattern(httpd_nagios_script_t, nagios_etc_t, nagios_etc_t)
|
||||
allow httpd_nagios_script_t nagios_etc_t:dir list_dir_perms;
|
||||
read_files_pattern(httpd_nagios_script_t, nagios_etc_t, nagios_etc_t)
|
||||
read_lnk_files_pattern(httpd_nagios_script_t, nagios_etc_t, nagios_etc_t)
|
||||
|
||||
allow httpd_nagios_script_t nagios_log_t:dir list_dir_perms;
|
||||
read_files_pattern(httpd_nagios_script_t, nagios_etc_t, nagios_log_t)
|
||||
read_lnk_files_pattern(httpd_nagios_script_t, nagios_etc_t, nagios_log_t)
|
||||
allow httpd_nagios_script_t nagios_log_t:dir list_dir_perms;
|
||||
read_files_pattern(httpd_nagios_script_t, nagios_etc_t, nagios_log_t)
|
||||
read_lnk_files_pattern(httpd_nagios_script_t, nagios_etc_t, nagios_log_t)
|
||||
|
||||
kernel_read_system_state(httpd_nagios_script_t)
|
||||
kernel_read_system_state(httpd_nagios_script_t)
|
||||
|
||||
domain_dontaudit_read_all_domains_state(httpd_nagios_script_t)
|
||||
domain_dontaudit_read_all_domains_state(httpd_nagios_script_t)
|
||||
|
||||
files_read_etc_runtime_files(httpd_nagios_script_t)
|
||||
files_read_kernel_symbol_table(httpd_nagios_script_t)
|
||||
files_read_etc_runtime_files(httpd_nagios_script_t)
|
||||
files_read_kernel_symbol_table(httpd_nagios_script_t)
|
||||
|
||||
logging_send_syslog_msg(httpd_nagios_script_t)
|
||||
logging_send_syslog_msg(httpd_nagios_script_t)
|
||||
')
|
||||
|
||||
########################################
|
||||
#
|
||||
|
@ -196,7 +193,6 @@ files_search_etc(nrpe_t)
|
|||
|
||||
manage_files_pattern(nrpe_t, nrpe_var_run_t, nrpe_var_run_t)
|
||||
files_pid_filetrans(nrpe_t, nrpe_var_run_t, file)
|
||||
files_read_etc_files(nrpe_t)
|
||||
|
||||
kernel_read_system_state(nrpe_t)
|
||||
kernel_read_kernel_sysctls(nrpe_t)
|
||||
|
@ -215,6 +211,7 @@ domain_use_interactive_fds(nrpe_t)
|
|||
domain_read_all_domains_state(nrpe_t)
|
||||
|
||||
files_read_etc_runtime_files(nrpe_t)
|
||||
files_read_etc_files(nrpe_t)
|
||||
|
||||
fs_getattr_all_fs(nrpe_t)
|
||||
fs_search_auto_mountpoints(nrpe_t)
|
||||
|
@ -256,9 +253,10 @@ corecmd_read_bin_files(nagios_admin_plugin_t)
|
|||
corecmd_read_bin_symlinks(nagios_admin_plugin_t)
|
||||
|
||||
dev_read_urand(nagios_admin_plugin_t)
|
||||
dev_getattr_all_chr_files(nagios_admin_plugin_t)
|
||||
dev_getattr_all_blk_files(nagios_admin_plugin_t)
|
||||
|
||||
files_read_etc_files(nagios_admin_plugin_t)
|
||||
|
||||
# for check_file_age plugin
|
||||
files_getattr_all_dirs(nagios_admin_plugin_t)
|
||||
files_getattr_all_files(nagios_admin_plugin_t)
|
||||
|
@ -266,8 +264,6 @@ files_getattr_all_symlinks(nagios_admin_plugin_t)
|
|||
files_getattr_all_pipes(nagios_admin_plugin_t)
|
||||
files_getattr_all_sockets(nagios_admin_plugin_t)
|
||||
files_getattr_all_file_type_fs(nagios_admin_plugin_t)
|
||||
dev_getattr_all_chr_files(nagios_admin_plugin_t)
|
||||
dev_getattr_all_blk_files(nagios_admin_plugin_t)
|
||||
|
||||
######################################
|
||||
#
|
||||
|
@ -294,12 +290,14 @@ logging_send_syslog_msg(nagios_mail_plugin_t)
|
|||
|
||||
sysnet_read_config(nagios_mail_plugin_t)
|
||||
|
||||
nscd_dontaudit_search_pid(nagios_mail_plugin_t)
|
||||
|
||||
optional_policy(`
|
||||
mta_send_mail(nagios_mail_plugin_t)
|
||||
')
|
||||
|
||||
optional_policy(`
|
||||
nscd_dontaudit_search_pid(nagios_mail_plugin_t)
|
||||
')
|
||||
|
||||
optional_policy(`
|
||||
postfix_stream_connect_master(nagios_mail_plugin_t)
|
||||
posftix_exec_postqueue(nagios_mail_plugin_t)
|
||||
|
@ -323,6 +321,7 @@ storage_raw_read_fixed_disk(nagios_checkdisk_plugin_t)
|
|||
#
|
||||
# local policy for service check plugins
|
||||
#
|
||||
|
||||
allow nagios_services_plugin_t self:capability { net_bind_service net_raw };
|
||||
allow nagios_services_plugin_t self:process { signal sigkill };
|
||||
|
||||
|
@ -365,20 +364,29 @@ manage_files_pattern(nagios_system_plugin_t, nagios_system_plugin_tmp_t, nagios_
|
|||
manage_dirs_pattern(nagios_system_plugin_t, nagios_system_plugin_tmp_t, nagios_system_plugin_tmp_t)
|
||||
files_tmp_filetrans(nagios_system_plugin_t, nagios_system_plugin_tmp_t, { dir file })
|
||||
|
||||
corecmd_exec_bin(nagios_system_plugin_t)
|
||||
corecmd_exec_shell(nagios_system_plugin_t)
|
||||
|
||||
kernel_read_system_state(nagios_system_plugin_t)
|
||||
kernel_read_kernel_sysctls(nagios_system_plugin_t)
|
||||
|
||||
files_read_etc_files(nagios_system_plugin_t)
|
||||
corecmd_exec_bin(nagios_system_plugin_t)
|
||||
corecmd_exec_shell(nagios_system_plugin_t)
|
||||
|
||||
dev_read_sysfs(nagios_system_plugin_t)
|
||||
dev_read_urand(nagios_system_plugin_t)
|
||||
|
||||
domain_read_all_domains_state(nagios_system_plugin_t)
|
||||
|
||||
files_read_etc_files(nagios_system_plugin_t)
|
||||
|
||||
# needed by check_users plugin
|
||||
optional_policy(`
|
||||
init_read_utmp(nagios_system_plugin_t)
|
||||
')
|
||||
|
||||
########################################
|
||||
#
|
||||
# Unconfined plugin policy
|
||||
#
|
||||
|
||||
optional_policy(`
|
||||
unconfined_domain(nagios_unconfined_plugin_t)
|
||||
')
|
||||
|
|
Loading…
Reference in New Issue