Bug 1484943 - SELinux is preventing nrpe from 'read' accesses on the file /etc/nagios/nrpe.cfg.
Summary: SELinux is preventing nrpe from 'read' accesses on the file /etc/nagios/nrpe....
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 25
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
Whiteboard: abrt_hash:b99493e582801206a06a0386a3f...
Depends On:
TreeView+ depends on / blocked
Reported: 2017-08-24 15:31 UTC by Raman Gupta
Modified: 2017-12-12 10:13 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-12-12 10:13:29 UTC
Type: ---

Attachments (Terms of Use)

Description Raman Gupta 2017-08-24 15:31:25 UTC
Description of problem:
SELinux is preventing nrpe from 'read' accesses on the file /etc/nagios/nrpe.cfg.

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/etc/nagios/nrpe.cfg default label should be nrpe_etc_t.
Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
# /sbin/restorecon -v /etc/nagios/nrpe.cfg

*****  Plugin catchall (1.49 confidence) suggests   **************************

If you believe that nrpe should be allowed read access on the nrpe.cfg file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# ausearch -c 'nrpe' --raw | audit2allow -M my-nrpe
# semodule -X 300 -i my-nrpe.pp

Additional Information:
Source Context                system_u:system_r:nrpe_t:s0
Target Context                unconfined_u:object_r:nagios_etc_t:s0
Target Objects                /etc/nagios/nrpe.cfg [ file ]
Source                        nrpe
Source Path                   nrpe
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    <Unknown>
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.12.8-200.fc25.x86_64 #1 SMP Thu
                              Aug 17 15:39:27 UTC 2017 x86_64 x86_64
Alert Count                   1
First Seen                    2017-08-24 10:53:13 EDT
Last Seen                     2017-08-24 10:53:13 EDT
Local ID                      65cae78d-af7b-4aa7-8767-f001960f0195

Raw Audit Messages
type=AVC msg=audit(1503586393.329:113): avc:  denied  { read } for  pid=1497 comm="nrpe" name="nrpe.cfg" dev="dm-0" ino=1180094 scontext=system_u:system_r:nrpe_t:s0 tcontext=unconfined_u:object_r:nagios_etc_t:s0 tclass=file permissive=0

Hash: nrpe,nrpe_t,nagios_etc_t,file,read

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.12.8-200.fc25.x86_64
type:           libreport

Comment 1 Fedora End Of Life 2017-11-16 19:57:18 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 2 Fedora End Of Life 2017-12-12 10:13:29 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

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