Bug 689134 - SELinux is preventing qemu from 'read' accesses on the file /etc/localtime.
Summary: SELinux is preventing qemu from 'read' accesses on the file /etc/localtime.
Keywords:
Status: CLOSED DUPLICATE of bug 689133
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 14
Hardware: i386
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:4c287ca315d...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-19 19:05 UTC by bill milks
Modified: 2011-03-21 12:02 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-21 12:02:38 UTC
Type: ---


Attachments (Terms of Use)

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

*****  Plugin restorecon (90.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 qemu_file_image (9.50 confidence) suggests  ********************

If localtime is a virtualization target
Then you need to change the label on localtime'
Do
# semanage fcontext -a -t virt_image_t '/etc/localtime'
# restorecon -v '/etc/localtime'

*****  Plugin catchall (1.40 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:qemu_t:s0-s0:c0.c1023
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                   5
First Seen                    Sat 19 Mar 2011 02:28:07 PM EDT
Last Seen                     Sat 19 Mar 2011 02:40:56 PM EDT
Local ID                      ee7acf7b-5c07-43d9-a45b-1bd864b3d1d3

Raw Audit Messages
type=AVC msg=audit(1300560056.597:70): avc:  denied  { read } for  pid=4827 comm="qemu" name="localtime" dev=dm-0 ino=3847 scontext=system_u:system_r:qemu_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_runtime_t:s0 tclass=file


Hash: qemu,qemu_t,etc_runtime_t,file,read

audit2allow

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

audit2allow -R

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

Comment 1 Miroslav Grepl 2011-03-21 12:02:38 UTC

*** This bug has been marked as a duplicate of bug 689133 ***


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