Bug 666001 - SELinux is preventing /usr/bin/python from 'read' accesses on the file /etc/localtime.
Summary: SELinux is preventing /usr/bin/python from 'read' accesses on the file /etc/l...
Keywords:
Status: CLOSED DUPLICATE of bug 666557
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 14
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:dac559e978c...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-28 10:46 UTC by Pablo Barros
Modified: 2011-03-19 19:06 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-01-05 08:32:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Pablo Barros 2010-12-28 10:46:16 UTC
SELinux is preventing /usr/bin/python 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 python 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 /usr/bin/python /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:setroubleshoot_fixit_t:s0-s0:c0.
                              c1023
Target Context                system_u:object_r:etc_runtime_t:s0
Target Objects                /etc/localtime [ file ]
Source                        SetroubleshootF
Source Path                   /usr/bin/python
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           python-2.7-8.fc14.1
Target RPM Packages           glibc-2.12.90-21
Policy RPM                    selinux-policy-3.9.7-18.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.35.10-74.fc14.x86_64 #1 SMP Thu Dec 23
                              16:04:50 UTC 2010 x86_64 x86_64
Alert Count                   4
First Seen                    Tue 28 Dec 2010 05:41:40 AM EST
Last Seen                     Tue 28 Dec 2010 05:41:49 AM EST
Local ID                      7389779f-a6a5-431e-aa89-23902ab63e0b

Raw Audit Messages
type=AVC msg=audit(1293532909.711:21187): avc:  denied  { read } for  pid=2006 comm="sealert" name="localtime" dev=sda6 ino=5057 scontext=system_u:system_r:setroubleshoot_fixit_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_runtime_t:s0 tclass=file

SetroubleshootF,setroubleshoot_fixit_t,etc_runtime_t,file,read
type=SYSCALL msg=audit(1293532909.711:21187): arch=x86_64 syscall=open success=no exit=EACCES a0=7fd43b3f374d a1=0 a2=1b6 a3=2 items=0 ppid=2005 pid=2006 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=sealert exe=/usr/bin/python subj=system_u:system_r:setroubleshoot_fixit_t:s0-s0:c0.c1023 key=(null)
SetroubleshootF,setroubleshoot_fixit_t,etc_runtime_t,file,read

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

Comment 1 Daniel Walsh 2010-12-28 13:11:40 UTC
Did you run the restorecon as suggested in the alert?

Comment 2 Pablo Barros 2010-12-28 15:06:15 UTC
Yes, and other alerts (for other programs trying to access the same file) keep appearing. This is a fresh Fedora 14 install.

Comment 3 Daniel Walsh 2010-12-28 20:03:11 UTC
ls -lZ /etc/localtime

restorecon -v /etc/localtime

Comment 4 Miroslav Grepl 2011-01-05 08:32:21 UTC

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


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