Bug 689133

Summary: SELinux is preventing qemu from 'read' accesses on the file /etc/localtime.
Product: [Fedora] Fedora Reporter: bill milks <wmilks>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 14CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:916b653440110235d54149561242300601a58d97ca5576cee48a821999f1a292
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-07 06:10:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description bill milks 2011-03-19 19:04:22 UTC
SELinux is preventing qemu from 'read' accesses on the file /etc/localtime.

*****  Plugin restorecon (99.5 confidence) suggests  *************************

If you want to fix the label. 
/etc/localtime default label should be locale_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /etc/localtime

*****  Plugin catchall (1.49 confidence) suggests  ***************************

If you believe that qemu should be allowed read access on the localtime file 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 qemu /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:svirt_t:s0:c602,c986
Target Context                system_u:object_r:etc_runtime_t:s0
Target Objects                /etc/localtime [ file ]
Source                        qemu
Source Path                   qemu
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           glibc-2.13-1
Policy RPM                    selinux-policy-3.9.7-31.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.35.11-83.fc14.i686 #1 SMP Mon Feb 7 07:04:18
                              UTC 2011 i686 i686
Alert Count                   1
First Seen                    Sat 19 Mar 2011 02:35:21 PM EDT
Last Seen                     Sat 19 Mar 2011 02:35:21 PM EDT
Local ID                      2dee91b4-5167-41f6-8206-68f9b7e3f5f1

Raw Audit Messages
type=AVC msg=audit(1300559721.836:65): avc:  denied  { read } for  pid=4386 comm="qemu" name="localtime" dev=dm-0 ino=3847 scontext=system_u:system_r:svirt_t:s0:c602,c986 tcontext=system_u:object_r:etc_runtime_t:s0 tclass=file


Hash: qemu,svirt_t,etc_runtime_t,file,read

audit2allow

#============= svirt_t ==============
allow svirt_t etc_runtime_t:file read;

audit2allow -R

#============= svirt_t ==============
allow svirt_t etc_runtime_t:file read;

Comment 1 Miroslav Grepl 2011-03-21 12:02:20 UTC
Do you use KDE?

Comment 2 Miroslav Grepl 2011-03-21 12:02:39 UTC
*** Bug 689134 has been marked as a duplicate of this bug. ***

Comment 3 Miroslav Grepl 2011-04-07 06:10:59 UTC
Should be fixed in the latest release.