Description of problem: Selinux prevents nagios to ping Version-Release number of selected component (if applicable): latest fedora 9 How reproducible: everytime Steps to Reproduce: 1. run nagios to ping a host 2. 3. Actual results: Expected results: Additional info: Sep 19 16:56:08 fedora-pc setroubleshoot: SELinux is preventing ping (ping_t) "read" to /var/spool/nagios/cmd/nagios.cmd (nagios_spool_t). For complete SELinux messages. run sealert -l f91f93bd-0dd7-44f2-9199-149223c78b0b [root@fedora-pc ~]# sealert -l f91f93bd-0dd7-44f2-9199-149223c78b0b Summary: SELinux is preventing ping (ping_t) "read" to /var/spool/nagios/cmd/nagios.cmd (nagios_spool_t). Detailed Description: [SELinux is in permissive mode, the operation would have been denied but was permitted due to permissive mode.] SELinux denied access requested by ping. It is not expected that this access is required by ping and this access may signal an intrusion attempt. It is also possible that the specific version or configuration of the application is causing it to require additional access. Allowing Access: You can generate a local policy module to allow this access - see FAQ (http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Or you can disable SELinux protection altogether. Disabling SELinux protection is not recommended. Please file a bug report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi) against this package. Additional Information: Source Context system_u:system_r:ping_t Target Context unconfined_u:object_r:nagios_spool_t Target Objects /var/spool/nagios/cmd/nagios.cmd [ fifo_file ] Source ping Source Path /bin/ping Port <Unknown> Host fedora-pc.huijbers.net Source RPM Packages iputils-20070202-5.fc8 Target RPM Packages Policy RPM selinux-policy-3.0.8-115.fc8 Selinux Enabled True Policy Type targeted MLS Enabled True Enforcing Mode Permissive Plugin Name catchall Host Name fedora-pc.huijbers.net Platform Linux fedora-pc.huijbers.net 2.6.26.3-14.fc8 #1 SMP Wed Sep 3 03:40:05 EDT 2008 i686 i686 Alert Count 770 First Seen Fri Aug 15 09:25:53 2008 Last Seen Fri Sep 19 17:05:08 2008 Local ID f91f93bd-0dd7-44f2-9199-149223c78b0b Line Numbers Raw Audit Messages host=fedora-pc.huijbers.net type=AVC msg=audit(1221836708.230:8276): avc: denied { read } for pid=32412 comm="ping" path="/var/spool/nagios/cmd/nagios.cmd" dev=dm-0 ino=6456086 scontext=system_u:system_r:ping_t:s0 tcontext=unconfined_u:object_r:nagios_spool_t:s0 tclass=fifo_file host=fedora-pc.huijbers.net type=SYSCALL msg=audit(1221836708.230:8276): arch=40000003 syscall=11 success=yes exit=0 a0=922aa48 a1=922aae0 a2=bff5e374 a3=922aae0 items=0 ppid=32411 pid=32412 auid=4294967295 uid=493 gid=488 euid=0 suid=0 fsuid=0 egid=488 sgid=488 fsgid=488 tty=(none) ses=4294967295 comm="ping" exe="/bin/ping" subj=system_u:system_r:ping_t:s0 key=(null)
This says the ping command is reading /var/spool/nagios/cmd/nagios.cmd, which seems highly unlikely. Looks like a leaked file descriptor. nagios should close all open file descriptors before execing apps. fcntl(fd, F_SETFD, FD_CLOEXEC)
Asked upstream about this problem.
Which nagios / nagios-plugins packages are you using ? Does this error still happen ?
It is still happening: Oct 21 19:40:09 fedora-pc setroubleshoot: SELinux is preventing ping (ping_t) "read" to /var/spool/nagios/cmd/nagios.cmd (nagios_spool_t). For complete SELinux messages. run sealert -l 16694f13-1bb8-4c89-b580-a58e508a4d8a [root@fedora-pc ~]# sealert -l 16694f13-1bb8-4c89-b580-a58e508a4d8a Summary: SELinux is preventing ping (ping_t) "read" to /var/spool/nagios/cmd/nagios.cmd (nagios_spool_t). Detailed Description: [SELinux is in permissive mode, the operation would have been denied but was permitted due to permissive mode.] SELinux denied access requested by ping. It is not expected that this access is required by ping and this access may signal an intrusion attempt. It is also possible that the specific version or configuration of the application is causing it to require additional access. Allowing Access: You can generate a local policy module to allow this access - see FAQ (http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Or you can disable SELinux protection altogether. Disabling SELinux protection is not recommended. Please file a bug report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi) against this package. Additional Information: Source Context unconfined_u:system_r:ping_t Target Context unconfined_u:object_r:nagios_spool_t Target Objects /var/spool/nagios/cmd/nagios.cmd [ fifo_file ] Source ping Source Path /bin/ping Port <Unknown> Host fedora-pc.huijbers.net Source RPM Packages iputils-20071127-2.fc9 Target RPM Packages Policy RPM selinux-policy-3.3.1-99.fc9 Selinux Enabled True Policy Type targeted MLS Enabled True Enforcing Mode Permissive Plugin Name catchall Host Name fedora-pc.huijbers.net Platform Linux fedora-pc.huijbers.net 2.6.26.5-45.fc9.i686 #1 SMP Sat Sep 20 03:45:00 EDT 2008 i686 i686 Alert Count 3891 First Seen Wed Aug 13 20:13:07 2008 Last Seen Tue Oct 21 19:40:09 2008 Local ID 16694f13-1bb8-4c89-b580-a58e508a4d8a Line Numbers Raw Audit Messages host=fedora-pc.huijbers.net type=AVC msg=audit(1224610809.255:18668): avc: denied { read } for pid=22076 comm="ping" path="/var/spool/nagios/cmd/nagios.cmd" dev=dm-0 ino=6456086 scontext=unconfined_u:system_r:ping_t:s0 tcontext=unconfined_u:object_r:nagios_spool_t:s0 tclass=fifo_file host=fedora-pc.huijbers.net type=SYSCALL msg=audit(1224610809.255:18668): arch=40000003 syscall=11 success=yes exit=0 a0=81289a0 a1=8128ae8 a2=bfce8294 a3=0 items=0 ppid=22075 pid=22076 auid=500 uid=493 gid=488 euid=0 suid=0 fsuid=0 egid=488 sgid=488 fsgid=488 tty=(none) ses=2269 comm="ping" exe="/bin/ping" subj=unconfined_u:system_r:ping_t:s0 key=(null) I'm using these packages: [root@fedora-pc ~]# rpm -qa | grep nagios nagios-plugins-mrtgtraf-1.4.13-5.fc9.i386 nagios-plugins-dig-1.4.13-5.fc9.i386 nagios-plugins-nrpe-2.7-6.fc9.i386 nagios-plugins-mrtg-1.4.13-5.fc9.i386 nagios-plugins-radius-1.4.13-5.fc9.i386 nagios-plugins-by_ssh-1.4.13-5.fc9.i386 nagios-plugins-overcr-1.4.13-5.fc9.i386 nagios-plugins-dummy-1.4.13-5.fc9.i386 nagios-plugins-perl-1.4.13-5.fc9.i386 nagios-plugins-disk-1.4.13-5.fc9.i386 nagios-plugins-http-1.4.13-5.fc9.i386 nagios-plugins-mailq-1.4.13-5.fc9.i386 nagios-plugins-ifstatus-1.4.13-5.fc9.i386 nagios-plugins-1.4.13-5.fc9.i386 nagios-plugins-swap-1.4.13-5.fc9.i386 nagios-plugins-users-1.4.13-5.fc9.i386 nagios-plugins-time-1.4.13-5.fc9.i386 nagios-plugins-wave-1.4.13-5.fc9.i386 nagios-plugins-ssh-1.4.13-5.fc9.i386 nagios-plugins-dhcp-1.4.13-5.fc9.i386 nagios-plugins-nwstat-1.4.13-5.fc9.i386 nagios-plugins-dns-1.4.13-5.fc9.i386 nagios-plugins-mysql-1.4.13-5.fc9.i386 nagios-plugins-ldap-1.4.13-5.fc9.i386 nagios-plugins-smtp-1.4.13-5.fc9.i386 nagios-plugins-ircd-1.4.13-5.fc9.i386 nagios-plugins-procs-1.4.13-5.fc9.i386 nagios-plugins-fping-1.4.13-5.fc9.i386 nagios-plugins-ide_smart-1.4.13-5.fc9.i386 nagios-plugins-oracle-1.4.13-5.fc9.i386 nagios-plugins-ntp-1.4.13-5.fc9.i386 nagios-plugins-tcp-1.4.13-5.fc9.i386 nagios-2.11-3.fc9.i386 nagios-plugins-rpc-1.4.13-5.fc9.i386 nagios-plugins-sensors-1.4.13-5.fc9.i386 nagios-plugins-ifoperstatus-1.4.13-5.fc9.i386 nagios-plugins-hpjd-1.4.13-5.fc9.i386 nagios-plugins-icmp-1.4.13-5.fc9.i386 nagios-plugins-ups-1.4.13-5.fc9.i386 nagios-plugins-pgsql-1.4.13-5.fc9.i386 nagios-plugins-snmp-1.4.13-5.fc9.i386 nagios-plugins-disk_smb-1.4.13-5.fc9.i386 nagios-plugins-all-1.4.13-5.fc9.i386 nagios-plugins-ping-1.4.13-5.fc9.i386 nagios-plugins-cluster-1.4.13-5.fc9.i386 nagios-plugins-game-1.4.13-5.fc9.i386 nagios-plugins-flexlm-1.4.13-5.fc9.i386 nagios-plugins-nt-1.4.13-5.fc9.i386 nagios-plugins-real-1.4.13-5.fc9.i386 nagios-plugins-file_age-1.4.13-5.fc9.i386 nagios-plugins-nagios-1.4.13-5.fc9.i386 nagios-plugins-breeze-1.4.13-5.fc9.i386 nagios-plugins-load-1.4.13-5.fc9.i386 nagios-plugins-udp-1.4.13-5.fc9.i386 nagios-plugins-log-1.4.13-5.fc9.i386
This message is a reminder that Fedora 9 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 9. 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 WONTFIX if it remains open with a Fedora 'version' of '9'. 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 prior to Fedora 9's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 9 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 please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. 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. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
I'm actually not able to reproduce this on a fresh F-11 install. Exactly what command are you running?
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 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. Thank you for reporting this bug and we are sorry it could not be fixed.
*** This bug has been marked as a duplicate of bug 591832 ***