Bug 727463

Summary: SELinux is preventing /usr/libexec/kde4/kcmdatetimehelper from 'create' accesses on the directory /.kde.
Product: [Fedora] Fedora Reporter: Ray Evans <jaguar07>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:5854fa251734d4cd6c9e179dbd8ba5786bdd4cea30f25865c5f6e96959024c4e
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-02 11:33:44 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:

Description Ray Evans 2011-08-02 08:18:53 UTC
SELinux is preventing /usr/libexec/kde4/kcmdatetimehelper from 'create' accesses on the directory /.kde.

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

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

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

If you believe that kcmdatetimehelper should be allowed create access on the .kde directory 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:root_t:s0
Target Objects                /.kde [ dir ]
Source                        kcmdatetimehelp
Source Path                   /usr/libexec/kde4/kcmdatetimehelper
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           kdebase-workspace-4.6.5-2.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-35.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.40-4.fc15.x86_64 #1 SMP Fri Jul 29
                              18:46:53 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Tue 02 Aug 2011 01:17:47 AM PDT
Last Seen                     Tue 02 Aug 2011 01:17:47 AM PDT
Local ID                      80f0cab0-bd61-4933-9e98-73169aae3be6

Raw Audit Messages
type=AVC msg=audit(1312273067.942:143): avc:  denied  { create } for  pid=3366 comm="kcmdatetimehelp" name=".kde" scontext=system_u:system_r:gnomeclock_t:s0-s0:c0.c1023 tcontext=system_u:object_r:root_t:s0 tclass=dir


type=SYSCALL msg=audit(1312273067.942:143): arch=x86_64 syscall=mkdir success=no exit=EACCES a0=1392168 a1=1c0 a2=ffffffffffffff60 a3=7fff071c7c50 items=1 ppid=1 pid=3366 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)

type=CWD msg=audit(1312273067.942:143): cwd=/

type=PATH msg=audit(1312273067.942:143): item=0 name=/.kde inode=2 dev=08:01 mode=040555 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:root_t:s0

Hash: kcmdatetimehelp,gnomeclock_t,root_t,dir,create

audit2allow

#============= gnomeclock_t ==============
allow gnomeclock_t root_t:dir create;

audit2allow -R

#============= gnomeclock_t ==============
allow gnomeclock_t root_t:dir create;

Comment 1 Ray Evans 2011-08-02 08:23:42 UTC
This occurs when attempting to update the system time with the KDE clock icon in the Task Manager's "System Tray" to an ntp time server and auto update.

Comment 2 Miroslav Grepl 2011-08-02 11:33:44 UTC
This is a bug in KDE.

You can allow it for now using

# semanage fcontext -a -e /usr/share/kde4 /.kde
# restorecon -R -v /.kde

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