Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1426824 - Current selinux policy break nagios
Current selinux policy break nagios
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy (Show other bugs)
7.3
All Linux
medium Severity medium
: rc
: ---
Assigned To: Lukas Vrabec
Milos Malik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-02-25 05:52 EST by M. Scherer
Modified: 2018-06-14 23:56 EDT (History)
9 users (show)

See Also:
Fixed In Version: selinux-policy-3.13.1-175.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 08:26:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0763 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2018-04-10 08:08:10 EDT

  None (edit)
Description M. Scherer 2017-02-25 05:52:03 EST
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 06:09:49 EST
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 08:26:56 EDT
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.