Bug 979795 - SELinux is preventing /usr/lib64/nagios/plugins/check_mysql from 'read' accesses on the directory cpu.
SELinux is preventing /usr/lib64/nagios/plugins/check_mysql from 'read' acces...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-06-30 13:20 EDT by Juan Orti
Modified: 2013-07-06 21:32 EDT (History)
3 users (show)

See Also:
Fixed In Version: selinux-policy-3.12.1-59.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-06 21:32:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Juan Orti 2013-06-30 13:20:17 EDT
Description of problem:
SELinux is preventing /usr/lib64/nagios/plugins/check_mysql from 'read' accesses on the directory cpu.

*****  Plugin catchall (100. confidence) suggests  ***************************

If cree que de manera predeterminada, check_mysql debería permitir acceso read sobre  cpu directory.     
Then debería reportar esto como un error.
Puede generar un módulo de política local para permitir este acceso.
permita el acceso momentáneamente executando:
# grep check_mysql /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:nagios_services_plugin_t:s0
Target Context                system_u:object_r:sysfs_t:s0
Target Objects                cpu [ dir ]
Source                        check_mysql
Source Path                   /usr/lib64/nagios/plugins/check_mysql
Port                          <Desconocido>
Host                          (removed)
Source RPM Packages           nagios-plugins-mysql-1.4.16-7.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-54.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.6-301.fc19.x86_64 #1 SMP Mon
                              Jun 17 14:26:26 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-06-30 19:19:07 CEST
Last Seen                     2013-06-30 19:19:07 CEST
Local ID                      30c6eff2-f00c-47b7-88cd-e54e7824b92f

Raw Audit Messages
type=AVC msg=audit(1372612747.202:2349): avc:  denied  { read } for  pid=15494 comm="check_mysql" name="cpu" dev="sysfs" ino=37 scontext=system_u:system_r:nagios_services_plugin_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=dir

type=SYSCALL msg=audit(1372612747.202:2349): arch=x86_64 syscall=openat success=no exit=EACCES a0=ffffffffffffff9c a1=7fafc03a5b18 a2=90800 a3=0 items=0 ppid=15493 pid=15494 auid=4294967295 uid=981 gid=976 euid=981 suid=981 fsuid=981 egid=976 sgid=976 fsgid=976 ses=4294967295 tty=(none) comm=check_mysql exe=/usr/lib64/nagios/plugins/check_mysql subj=system_u:system_r:nagios_services_plugin_t:s0 key=(null)

Hash: check_mysql,nagios_services_plugin_t,sysfs_t,dir,read

Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.9.6-301.fc19.x86_64
type:           libreport
Comment 1 Miroslav Grepl 2013-07-01 06:58:57 EDT
commit 5052796b81c0b43048be94b9ea12ff633adc3959
Author: Miroslav Grepl <mgrepl@redhat.com>
Date:   Mon Jul 1 12:58:49 2013 +0200

    Allow nagios plugins to read /sys info
Comment 2 Fedora Update System 2013-07-03 15:49:56 EDT
selinux-policy-3.12.1-59.fc19 has been submitted as an update for Fedora 19.
Comment 3 Fedora Update System 2013-07-04 22:13:38 EDT
Package selinux-policy-3.12.1-59.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.12.1-59.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2013-07-06 21:32:54 EDT
selinux-policy-3.12.1-59.fc19 has been pushed to the Fedora 19 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.