Bug 1029119 - nagios-plugins-mrtgtraf-1.4.16-10.el6.x86_64 is unable to access mrtg logfiles required to function.
Summary: nagios-plugins-mrtgtraf-1.4.16-10.el6.x86_64 is unable to access mrtg logfile...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-11 17:13 UTC by Nick
Modified: 2014-01-13 16:24 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-01-13 16:24:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Nick 2013-11-11 17:13:47 UTC
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.

Comment 1 Miroslav Grepl 2014-01-13 16:24:00 UTC
Thank you.


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