Bug 1559683 - SELinux is preventing nagios from map access on the file /etc/nagios/nagios.cfg
Summary: SELinux is preventing nagios from map access on the file /etc/nagios/nagios.cfg
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 27
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-23 02:24 UTC by Edgar Hoch
Modified: 2018-03-27 20:13 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-03-27 20:13:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Edgar Hoch 2018-03-23 02:24:45 UTC
Description of problem:
SELinux is preventing nagios from map access on the file /etc/nagios/nagios.cfg


type=AVC msg=audit(1521771149.259:114): avc:  denied  { map } for  pid=850 comm="nagios" path="/etc/nagios/nagios.cfg" dev="dm-0" ino=2099781 scontext=system_u:system_r:nagios_t:s0 tcontext=system_u:object_r:nagios_etc_t:s0 tclass=file permissive=0


# ausearch -c 'nagios' --raw | audit2allow

#============= nagios_t ==============
allow nagios_t nagios_etc_t:file map;


Version-Release number of selected component (if applicable):
nagios-4.3.4-3.fc27.x86_64
selinux-policy-3.13.1-283.28.fc27.noarch
selinux-policy-targeted-3.13.1-283.28.fc27.noarch


How reproducible:
Always.

Steps to Reproduce:
1. systemctl start nagios
2. systemctl status nagios
3. Check logs in journalctl

Comment 1 Edgar Hoch 2018-03-23 02:41:33 UTC
After creating and installing a selinux module that allows access as described in the description, there occurs more selinux errors about nagios.

type=AVC msg=audit(1521772621.846:402): avc:  denied  { execute_no_trans } for  pid=2097 comm="nagios" path="/usr/sbin/nagios" dev="dm-0" ino=3824423 scontext=system_u:system_r:nagios_t:s0 tcontext=system_u:object_r:nagios_exec_t:s0 tclass=file permissive=1
type=AVC msg=audit(1521772621.862:403): avc:  denied  { map } for  pid=2096 comm="nagios" path="/var/spool/nagios/retention.dat" dev="dm-2" ino=1966128 scontext=system_u:system_r:nagios_t:s0 tcontext=system_u:object_r:nagios_spool_t:s0 tclass=file permissive=1


# ausearch -c 'nagios' --raw | audit2allow


#============= nagios_t ==============

#!!!! This avc is allowed in the current policy
allow nagios_t nagios_etc_t:file map;
allow nagios_t nagios_exec_t:file execute_no_trans;
allow nagios_t nagios_spool_t:file map;

Comment 2 Fedora Update System 2018-03-25 13:13:21 UTC
selinux-policy-3.13.1-283.29.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-ad9976b6a2

Comment 3 Fedora Update System 2018-03-25 22:41:47 UTC
selinux-policy-3.13.1-283.29.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-ad9976b6a2

Comment 4 Fedora Update System 2018-03-27 20:13:53 UTC
selinux-policy-3.13.1-283.29.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


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