Bug 895152

Summary: SELinux is preventing /usr/libexec/kde4/kcmdatetimehelper from 'write' accesses on the file /etc/timezone.
Product: [Fedora] Fedora Reporter: Bernardo Barros <bbarros>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:58e2f64c485f1022a95f21595f388c2ced34482bdd8daacb3c22f62eca0a2e05
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-15 02:13:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: type
none
File: hashmarkername none

Description Bernardo Barros 2013-01-14 17:25:50 UTC
Description of problem:
change timezone on kde

Additional info:
libreport version: 2.0.18
kernel:         3.4.24-1.rt36.1.fc17.ccrma.x86_64.rt

description:
:SELinux is preventing /usr/libexec/kde4/kcmdatetimehelper from 'write' accesses on the file /etc/timezone.
:
:*****  Plugin restorecon (99.5 confidence) suggests  *************************
:
:If you want to fix the label. 
:/etc/timezone default label should be locale_t.
:Then you can run restorecon.
:Do
:# /sbin/restorecon -v /etc/timezone
:
:*****  Plugin catchall (1.49 confidence) suggests  ***************************
:
:If you believe that kcmdatetimehelper should be allowed write access on the timezone 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 kcmdatetimehelp /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:gnomeclock_t:s0-s0:c0.c1023
:Target Context                system_u:object_r:etc_runtime_t:s0
:Target Objects                /etc/timezone [ file ]
:Source                        kcmdatetimehelp
:Source Path                   /usr/libexec/kde4/kcmdatetimehelper
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           kde-workspace-4.9.5-1.fc17.x86_64
:Target RPM Packages           systemd-44-23.fc17.x86_64
:Policy RPM                    selinux-policy-3.10.0-166.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Permissive
:Host Name                     (removed)
:Platform                      Linux (removed)
:                              3.4.24-1.rt36.1.fc17.ccrma.x86_64.rt #1 SMP
:                              PREEMPT RT Fri Dec 28 23:17:19 PST 2012 x86_64
:                              x86_64
:Alert Count                   1
:First Seen                    2013-01-14 09:22:37 PST
:Last Seen                     2013-01-14 09:22:37 PST
:Local ID                      73290946-80c7-4636-aca3-1b6b11bbd798
:
:Raw Audit Messages
:type=AVC msg=audit(1358184157.783:87): avc:  denied  { write } for  pid=4062 comm="kcmdatetimehelp" name="timezone" dev="sda2" ino=138910 scontext=system_u:system_r:gnomeclock_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_runtime_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1358184157.783:87): arch=x86_64 syscall=open success=yes exit=ECHILD a0=b23088 a1=80241 a2=1b6 a3=30 items=0 ppid=1 pid=4062 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=kcmdatetimehelp exe=/usr/libexec/kde4/kcmdatetimehelper subj=system_u:system_r:gnomeclock_t:s0-s0:c0.c1023 key=(null)
:
:Hash: kcmdatetimehelp,gnomeclock_t,etc_runtime_t,file,write
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:


Potential duplicate bug: 701607

Comment 1 Bernardo Barros 2013-01-14 17:25:53 UTC
Created attachment 678317 [details]
File: type

Comment 2 Bernardo Barros 2013-01-14 17:25:54 UTC
Created attachment 678318 [details]
File: hashmarkername

Comment 3 Daniel Walsh 2013-01-15 02:13:23 UTC
restorecon /etc/timezone

Will fix, do you have some kind of tool that is creating timezone at boot?

The alert told you what to do.