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 1426824 - Current selinux policy break nagios
Summary: Current selinux policy break nagios
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-25 10:52 UTC by M. Scherer
Modified: 2018-06-15 03:56 UTC (History)
9 users (show)

Fixed In Version: selinux-policy-3.13.1-175.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 12:26:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0763 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2018-04-10 12:08:10 UTC

Description M. Scherer 2017-02-25 10:52:03 UTC
Description of problem:
So I did a reboot of our infra for the latest kernel problem, and found out that selinux did prevent nagios from working, with AVC like this:

type=AVC msg=audit(1488019552.522:990): avc:  denied  { read } for  pid=14353 comm="status.cgi" name="objects.cache" dev="xvda1" ino=918300 scontext=system_u:system_r:nagios_script_t:s0 tcontext=system_u:object_r:nagios_spool_t:s0 tclass=file
type=AVC msg=audit(1488019552.522:990): avc:  denied  { open } for  pid=14353 comm="status.cgi" path="/var/spool/nagios/objects.cache" dev="xvda1" ino=918300 scontext=system_u:system_r:nagios_script_t:s0 tcontext=system_u:object_r:nagios_spool_t:s0 tclass=file
type=AVC msg=audit(1488019552.522:991): avc:  denied  { getattr } for  pid=14353 comm="status.cgi" path="/var/spool/nagios/objects.cache" dev="xvda1" ino=918300 scontext=system_u:system_r:nagios_script_t:s0 tcontext=system_u:object_r:nagios_spool_t:s0 tclass=file

So adding this line would be helpful.

allow nagios_script_t nagios_spool_t:file { getattr open read };


Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-102.el7_3.13.noarch

How reproducible:
each time

Steps to Reproduce:
1. install nagios (I have ansible playbook if needed)
2. connect on the web interface with selinux in enforcing


Actual results:
nagios say he can't read anything, and the web interface do not work. It show 1 page, but you can't see anything and can't interact, acknowledge alerts, etc. 

Expected results:
nagios work as expected.

Additional info:
nagios was upgraded in epel in version 4.2. 

maybe it would be useful to move selinux-contrib to EPEL in order to be able to get the policy in sync with the release of epel packages (rather than wait on RHEL release).

Comment 2 Ian Young 2017-02-27 11:09:49 UTC
Same issue. Perhaps worth adding that this seems to be because the upgrade moved some of the files around, thus giving them different labels:

# find / -name objects.cache -exec ls -lZ \{\} \;
-rw-r--r--. nagios nagios system_u:object_r:nagios_log_t:s0 /var/log/nagios/objects.cache
-rw-r--r--. nagios nagios system_u:object_r:nagios_spool_t:s0 /var/spool/nagios/objects.cache

Comment 10 errata-xmlrpc 2018-04-10 12:26:56 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.

https://access.redhat.com/errata/RHBA-2018:0763


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