Description of problem: nagios-plugins-mrtgtraf-1.4.16-10.el6.x86_64 is unable to access mrtg logfiles required to function. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: Enable selinux with default policy Install MRTG and monitor one or more devices Install Nagios and nagios-plugins-mrtgtraf Define a service in Nagios to monitor an MRTG graph similar to: define service{ use generic-service ; Inherit values from a template host_name router service_description Port 2 Bandwidth Usage check_command check_local_mrtgtraf!/var/lib/mrtg/my_router.log!AVG!1000000,1000000!5000000,5000000!10 } Actual results: Check fails to access log file Expected results: Check accesses log file and parses results Additional info: This SELinux policy will correct the issue: require { type nagios_system_plugin_t; type nagios_t; type mrtg_var_lib_t; type nagios_log_t; type var_lib_t; class process { siginh noatsecure rlimitinh }; class file { write read getattr open }; class dir search; } #============= nagios_system_plugin_t ============== #!!!! This avc is allowed in the current policy allow nagios_system_plugin_t mrtg_var_lib_t:file { read getattr open }; allow nagios_system_plugin_t mrtg_var_lib_t:dir search; #allow nagios_system_plugin_t nagios_log_t:file write; allow nagios_system_plugin_t var_lib_t:dir search; #============= nagios_t ============== #allow nagios_t nagios_system_plugin_t:process { siginh rlimitinh noatsecure }; This .te should probably be reparsed into the correct format, and added to /usr/share/selinux/devel/include/services/nagios.if.
Thank you.