Bug 862232

Summary: allow mysqld_safe (mysqld_safe_t) to read /etc/nsswitch.conf (etc_t) file
Product: [Fedora] Fedora Reporter: Remi Collet <fedora>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: dominick.grift, dwalsh, mgrepl, mmalik
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-20 15:07:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Remi Collet 2012-10-02 11:44:26 UTC
Description of problem:
AVC denials

Version-Release number of selected component (if applicable):
3.11.1-25

How reproducible:


Steps to Reproduce:
1. systemctl start mysqld.service
  
Actual results:

type=AVC msg=audit(1349177339.377:354): avc: denied { read } for pid=2063 comm="mysqld_safe" name="nsswitch.conf" dev="sda3" ino=1704126 scontext=system_u:system_r:mysqld_safe_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=file

type=AVC msg=audit(1349177339.377:354): avc: denied { open } for pid=2063 comm="mysqld_safe" path="/etc/nsswitch.conf" dev="sda3" ino=1704126 scontext=system_u:system_r:mysqld_safe_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=file
type=SYSCALL msg=audit(1349177339.377:354): arch=c000003e syscall=2 success=yes exit=3 a0=3ade578512 a1=80000 a2=1b6 a3=238 items=0 ppid=1 pid=2063 auid=4294967295 uid=27 gid=27 euid=27 suid=27 fsuid=27 egid=27 sgid=27 fsgid=27 tty=(none) ses=4294967295 comm="mysqld_safe" exe="/usr/bin/bash" subj=system_u:system_r:mysqld_safe_t:s0 key=(null)

type=AVC msg=audit(1349177339.378:355): avc: denied { getattr } for pid=2063 comm="mysqld_safe" path="/etc/nsswitch.conf" dev="sda3" ino=1704126 scontext=system_u:system_r:mysqld_safe_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=file
type=SYSCALL msg=audit(1349177339.378:355): arch=c000003e syscall=5 success=yes exit=0 a0=3 a1=7fff1c730a80 a2=7fff1c730a80 a3=78 items=0 ppid=1 pid=2063 auid=4294967295 uid=27 gid=27 euid=27 suid=27 fsuid=27 egid=27 sgid=27 fsgid=27 tty=(none) ses=4294967295 comm="mysqld_safe" exe="/usr/bin/bash" subj=system_u:system_r:mysqld_safe_t:s0 key=(null)

type=SERVICE_START msg=audit(1349177342.727:356): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=' comm="mysqld" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

Comment 1 Miroslav Grepl 2012-10-02 11:56:55 UTC
We allow it in the latest build.

allow mysqld_safe_t base_ro_file_type : file { ioctl read getattr lock open }

Comment 2 Fedora Update System 2012-10-11 09:03:25 UTC
selinux-policy-3.11.1-36.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-36.fc18

Comment 3 Fedora Update System 2012-10-11 17:22:03 UTC
Package selinux-policy-3.11.1-36.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-36.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-15934/selinux-policy-3.11.1-36.fc18
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2012-12-20 15:07:57 UTC
selinux-policy-3.11.1-36.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.