Bug 795790 - SELinux is preventing /usr/bin/mysqladmin from 'getattr' accesses on the None /root/.my.cnf.
Summary: SELinux is preventing /usr/bin/mysqladmin from 'getattr' accesses on the None...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 16
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:a9297b8bf3c6eb7c28d40ee900b...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-21 14:35 UTC by John Griffiths
Modified: 2012-04-04 13:50 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.10.0-80.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-04 13:50:57 UTC
Type: ---


Attachments (Terms of Use)

Description John Griffiths 2012-02-21 14:35:07 UTC
libreport version: 2.0.8
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.2.6-3.fc16.i686.PAE
reason:         SELinux is preventing /usr/bin/mysqladmin from 'getattr' accesses on the None /root/.my.cnf.
time:           Tue 21 Feb 2012 09:30:35 AM EST

description:
:SELinux is preventing /usr/bin/mysqladmin from 'getattr' accesses on the None /root/.my.cnf.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that mysqladmin should be allowed getattr access on the .my.cnf <Unknown> by default.
:Then you should report this as a bug.
:You can generate a local policy module to allow this access.
:Do
:allow this access for now by executing:
:# grep mysqladmin /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:logrotate_t:s0-s0:c0.c1023
:Target Context                unconfined_u:object_r:admin_home_t:s0
:Target Objects                /root/.my.cnf [ None ]
:Source                        mysqladmin
:Source Path                   /usr/bin/mysqladmin
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           mysql-5.5.20-1.fc16.i686
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-75.fc16.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.2.6-3.fc16.i686.PAE
:                              #1 SMP Mon Feb 13 20:44:23 UTC 2012 i686 i686
:Alert Count                   5
:First Seen                    Mon 13 Feb 2012 03:29:14 AM EST
:Last Seen                     Fri 17 Feb 2012 03:50:07 AM EST
:Local ID                      6066a18b-25a5-42bc-97bb-fef2670604ed
:
:Raw Audit Messages
:type=AVC msg=audit(1329468607.783:53861): avc:  denied  { getattr } for  pid=19013 comm="mysqladmin" path="/root/.my.cnf" dev=dm-0 ino=42993721 scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:admin_home_t:s0 tclass=filenode=(removed) type=SYSCALL msg=audit(1329468607.783:53861): arch=40000003 syscall=195 success=no exit=-13 a0=bfcf9022 a1=bfcf5fc0 a2=42819ff4 a3=bfcf5fc0 items=0 ppid=19009 pid=19013 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1863 comm="mysqladmin" exe="/usr/bin/mysqladmin" subj=system_u:system_r:logrotate_t:s0-s0:c0.c1023 key=(null)
:
:
:Hash: mysqladmin,logrotate_t,admin_home_t,None,getattr
:
:audit2allow
:
:
:audit2allow -R
:
:

Comment 1 Miroslav Grepl 2012-02-22 13:05:11 UTC
Execute

$ restorecon -R -v /root/.my.cnf

This will not happen with a new policy.


commit 16bcd61596aadf69ee2249232cb65b88c8653446
Author: Dan Walsh <dwalsh>
Date:   Thu Feb 16 10:07:22 2012 -0500

    Add mysqld_home_t for ~/.my.cnf
    Add unit file support to mysqld

Comment 2 John Griffiths 2012-02-22 15:17:37 UTC
I have the most recent selinux policy that has been in the yum repository to date; selinux-policy-3.10.0-75.fc16.noarch. 

restorecon -v ./my.cnf did nothing.

Comment 3 Miroslav Grepl 2012-02-22 15:51:19 UTC
Ah, I apologize. This is on F16 where I need to do a new build.

Comment 4 Fedora Update System 2012-02-29 09:32:03 UTC
selinux-policy-3.10.0-78.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-78.fc16

Comment 5 Fedora Update System 2012-03-01 09:24:11 UTC
Package selinux-policy-3.10.0-78.fc16:
* should fix your issue,
* was pushed to the Fedora 16 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.10.0-78.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-2733/selinux-policy-3.10.0-78.fc16
then log in and leave karma (feedback).

Comment 6 John Griffiths 2012-03-09 20:36:42 UTC
Any idea if this is ready and, if so, when this policy will be pushed to the updates repo?

Comment 7 Fedora Update System 2012-03-21 02:26:01 UTC
Package selinux-policy-3.10.0-80.fc16:
* should fix your issue,
* was pushed to the Fedora 16 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.10.0-80.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-2733/selinux-policy-3.10.0-80.fc16
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2012-03-24 00:38:12 UTC
selinux-policy-3.10.0-80.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 John Griffiths 2012-04-02 13:55:27 UTC
This is still happening.

rpm -q selinux-policy
selinux-policy-3.10.0-80.fc16.noarch

l -Z .my.cnf
-rw-------. root root unconfined_u:object_r:mysqld_home_t:s0 .my.cnf

SELinux is preventing /usr/bin/mysqladmin from getattr access on the file /root/.my.cnf.

Plugin: catchall 
you want to allow mysqladmin to have getattr access on the .my.cnf fileIf you believe that mysqladmin should be allowed getattr access on the .my.cnf file by default.
You should report this as a bug.
You can generate a local policy module to allow this access.
Allow this access for now by executing:
# grep mysqladmin /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Comment 10 Miroslav Grepl 2012-04-04 11:10:52 UTC
What AVC are you getting?

Comment 11 John Griffiths 2012-04-04 13:50:57 UTC
My mistake and apologies.

That was a leftover alert from selinux-policy-3.10.0-75.fc16.noarch

Re-closing.


Note You need to log in before you can comment on or make changes to this bug.