Bug 979795 - SELinux is preventing /usr/lib64/nagios/plugins/check_mysql from 'read' accesses on the directory cpu.
Summary: SELinux is preventing /usr/lib64/nagios/plugins/check_mysql from 'read' acces...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:b0788e43ebb1af17bf5f5f6c31a...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-30 17:20 UTC by Juan Orti Alcaine
Modified: 2013-07-07 01:32 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.12.1-59.fc19
Clone Of:
Environment:
Last Closed: 2013-07-07 01:32:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Juan Orti Alcaine 2013-06-30 17:20:17 UTC
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.
Do
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 10:58:57 UTC
commit 5052796b81c0b43048be94b9ea12ff633adc3959
Author: Miroslav Grepl <mgrepl>
Date:   Mon Jul 1 12:58:49 2013 +0200

    Allow nagios plugins to read /sys info

Comment 2 Fedora Update System 2013-07-03 19:49:56 UTC
selinux-policy-3.12.1-59.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-59.fc19

Comment 3 Fedora Update System 2013-07-05 02:13:38 UTC
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:
https://admin.fedoraproject.org/updates/FEDORA-2013-12373/selinux-policy-3.12.1-59.fc19
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-07-07 01:32:54 UTC
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.