RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 749311 - targeted selinux policy breaks nagios checks and event handlers
Summary: targeted selinux policy breaks nagios checks and event handlers
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.1
Hardware: All
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Michal Trunecka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-26 17:17 UTC by Thomas Wiest
Modified: 2014-09-30 23:33 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.7.19-138.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 12:28:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Log of selinux denied errors for nagios (92.04 KB, application/x-bzip)
2011-10-26 17:17 UTC, Thomas Wiest
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0780 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2012-06-19 20:34:59 UTC

Description Thomas Wiest 2011-10-26 17:17:17 UTC
Created attachment 530339 [details]
Log of selinux denied errors for nagios

Description of problem:
Since we updated selinux-policy and selinux-policy-targetd, our nagios event handlers haven't be able to execute to fix problems.

We rely heavily on our event handlers to fix problems when they arise, so this has impacted our team significantly.

Looking into the problem further, it seems that a lot of our nagios checks were being denied as well.

Attached is a grep of the selinux denied errors that we're seeing from just today.


Version-Release number of selected component (if applicable):
selinux-policy-3.7.19-113.el6.noarch
selinux-policy-targeted-3.7.19-113.el6.noarch


How reproducible:
Very.


Steps to Reproduce:
1. Setup nagios
2. Setup a service with an event handler
3. Make the service fail and notice that nagios says it's running the event handler, but notice that the event handler never actually executes.

  
Actual results:
Event handlers don't execute


Expected results:
Event handlers should be able to execute.

Comment 2 Miroslav Grepl 2011-10-27 09:18:58 UTC
Ok, the problem is event handlers are not supported.

Where are your handlers located?

In the /usr/lib64/nagios/plugins/eventhandlers/ directory?


I will need to add a  support for this and create a new domain for event handlers which could do everything. 

Probaly add a boolean as we have it for ABRT.

Comment 3 Thomas Wiest 2011-10-31 19:18:10 UTC
We've temporarily worked around the above denials, but we're now also getting this:

type=AVC msg=audit(1320087999.042:1062601): avc:  denied  { getattr } for  pid=18245 comm="handle_hard_eve" path="/us
r/lib64/nagios/plugins/check_by_ssh" dev=xvde1 ino=271688 scontext=unconfined_u:system_r:nagios_services_plugin_t:s0 
tcontext=system_u:object_r:nagios_unconfined_plugin_exec_t:s0 tclass=file

Comment 4 Thomas Wiest 2011-10-31 23:03:06 UTC
(In reply to comment #2)
> Where are your handlers located?


We put them in /usr/lib64/nagios/plugins/ however, the proper directory is /usr/lib64/nagios/plugins/eventhandlers/

(we just screwed up awhile ago and haven't bothered fixing it).

If we need to, I will put our event handlers in the proper dir.

Comment 23 errata-xmlrpc 2012-06-20 12:28:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0780.html


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