Bug 1029119 - nagios-plugins-mrtgtraf-1.4.16-10.el6.x86_64 is unable to access mrtg logfiles required to function.
nagios-plugins-mrtgtraf-1.4.16-10.el6.x86_64 is unable to access mrtg logfile...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-11-11 12:13 EST by Nick
Modified: 2014-01-13 11:24 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-01-13 11:24:00 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Nick 2013-11-11 12:13:47 EST
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

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.
Comment 1 Miroslav Grepl 2014-01-13 11:24:00 EST
Thank you.

Note You need to log in before you can comment on or make changes to this bug.