Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
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).
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
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
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).