| 1 |
module nagios_epel 1.1; |
| 2 |
|
| 3 |
require { |
| 4 |
type devlog_t; |
| 5 |
type hostname_exec_t; |
| 6 |
type kernel_t; |
| 7 |
type ldconfig_exec_t; |
| 8 |
type initrc_tmp_t; |
| 9 |
type nagios_exec_t; |
| 10 |
type httpd_nagios_script_t; |
| 11 |
type nagios_services_plugin_t; |
| 12 |
type nagios_spool_t; |
| 13 |
type nagios_system_plugin_t; |
| 14 |
type nagios_t; |
| 15 |
class capability chown; |
| 16 |
class file { execute execute_no_trans getattr open read }; |
| 17 |
class sock_file { write create unlink }; |
| 18 |
class unix_dgram_socket { connect create sendto }; |
| 19 |
class unix_stream_socket connectto; |
| 20 |
} |
| 21 |
|
| 22 |
#============= nagios_services_plugin_t ============== |
| 23 |
allow nagios_services_plugin_t devlog_t:sock_file write; |
| 24 |
allow nagios_services_plugin_t kernel_t:unix_dgram_socket sendto; |
| 25 |
allow nagios_services_plugin_t self:unix_dgram_socket { connect create }; |
| 26 |
|
| 27 |
#============= nagios_t ============== |
| 28 |
allow nagios_t hostname_exec_t:file { read getattr open execute execute_no_trans }; |
| 29 |
allow nagios_t ldconfig_exec_t:file { execute execute_no_trans open read }; |
| 30 |
allow nagios_t nagios_exec_t:file execute_no_trans; |
| 31 |
allow nagios_t nagios_spool_t:sock_file { write create unlink }; |
| 32 |
allow nagios_t self:capability chown; |
| 33 |
allow nagios_t self:unix_stream_socket connectto; |
| 34 |
|
| 35 |
#============= httpd_nagios_script_t ============== |
| 36 |
allow httpd_nagios_script_t nagios_spool_t:file { getattr open read }; |
| 37 |
|
| 38 |
#============= nagios_system_plugin_t ============== |
| 39 |
allow nagios_system_plugin_t nagios_spool_t:file { getattr open read }; |