Summary: SELinux is preventing /usr/lib64/nagios/plugins/check_disk "getattr" access on /dev/sdb1. Detailed Description: [check_disk has a permissive type (nrpe_t). This access was not denied.] SELinux denied access requested by check_disk. It is not expected that this access is required by check_disk 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) Please file a bug report. Additional Information: Source Context system_u:system_r:nrpe_t:s0 Target Context system_u:object_r:fixed_disk_device_t:s0 Target Objects /dev/sdb1 [ blk_file ] Source check_disk Source Path /usr/lib64/nagios/plugins/check_disk Port <Unknown> Host (removed) Source RPM Packages nagios-plugins-disk-1.4.13-17.fc12 Target RPM Packages Policy RPM selinux-policy-3.6.32-41.fc12 Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Plugin Name catchall Host Name (removed) Platform Linux (removed) 2.6.31.5-127.fc12.x86_64 #1 SMP Sat Nov 7 21:11:14 EST 2009 x86_64 x86_64 Alert Count 2 First Seen Fri 20 Nov 2009 02:55:00 PM CST Last Seen Fri 20 Nov 2009 02:56:19 PM CST Local ID 4c837a01-5371-4ba2-9f4c-8091717d3ef9 Line Numbers Raw Audit Messages node=(removed) type=AVC msg=audit(1258750579.618:30744): avc: denied { getattr } for pid=23360 comm="check_disk" path="/dev/sdb1" dev=tmpfs ino=3658 scontext=system_u:system_r:nrpe_t:s0 tcontext=system_u:object_r:fixed_disk_device_t:s0 tclass=blk_file node=(removed) type=SYSCALL msg=audit(1258750579.618:30744): arch=c000003e syscall=4 success=yes exit=128 a0=7fff28fa7e9f a1=f07090 a2=f07090 a3=8 items=0 ppid=23359 pid=23360 auid=4294967295 uid=488 gid=471 euid=488 suid=488 fsuid=488 egid=471 sgid=471 fsgid=471 tty=(none) ses=4294967295 comm="check_disk" exe="/usr/lib64/nagios/plugins/check_disk" subj=system_u:system_r:nrpe_t:s0 key=(null) Hash String generated from selinux-policy-3.6.32-41.fc12,catchall,check_disk,nrpe_t,fixed_disk_device_t,blk_file,getattr audit2allow suggests: #============= nrpe_t ============== allow nrpe_t fixed_disk_device_t:blk_file getattr;
This is using the Nagios plugin from the official Fedora 12 repo: nagios-plugins-disk-1.4.13-17.fc12.x86_64 The plugin works with SELinux in permissive mode, as you might expect.
Some additional rpm versions that might be helpful: nrpe-2.12-11.fc12.x86_64 selinux-policy-targeted-3.6.32-41.fc12.noarch selinux-policy-3.6.32-41.fc12.noarch
You can add these rules for now using # grep avc /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp You can add this for now. Miroslav can you write up a policy for the check_disk plugins for nagios to allow them to read fixed disk. I really do not want to give this access to all plugins.
Thanks, yeah I think adding that to all plugins would be overkill. As an example, I'm also using check_procs plugin on this workstation and it works fine within the selinux policy.
Dan, I have sent you a patch.
Fixed in selinux-policy-3.6.32-48.fc12.noarch
Thanks, I'll post back once I install the updated package. I haven't run the manual audit2allow or semodule commands on the affected system, so it should be a good test.
selinux-policy-3.6.32-49.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-49.fc12
selinux-policy-3.6.32-49.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update selinux-policy'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-12131
selinux-policy-3.6.32-49.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.
Sorry, I forgot to update this ticket, selinux-policy-3.6.32-49.fc12 resolved the problem on my system.