Bug 871089 - SELinux is preventing /usr/lib/systemd/systemd-timedated from 'create' accesses on the lnk_file .localtimef5edfe643b2a5c53.
Summary: SELinux is preventing /usr/lib/systemd/systemd-timedated from 'create' access...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:6ef13418681d46e44ab1dada18d...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-29 15:24 UTC by Steve Tyler
Modified: 2012-12-20 15:36 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-20 15:36:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: type (9 bytes, text/plain)
2012-10-29 15:24 UTC, Steve Tyler
no flags Details
File: hashmarkername (14 bytes, text/plain)
2012-10-29 15:24 UTC, Steve Tyler
no flags Details

Description Steve Tyler 2012-10-29 15:24:18 UTC
Additional info:
libreport version: 2.0.17
kernel:         3.6.3-3.fc18.x86_64

description:
:SELinux is preventing /usr/lib/systemd/systemd-timedated from 'create' accesses on the lnk_file .localtimef5edfe643b2a5c53.
:
:*****  Plugin catchall_labels (83.8 confidence) suggests  ********************
:
:If you want to allow systemd-timedated to have create access on the .localtimef5edfe643b2a5c53 lnk_file
:Then you need to change the label on .localtimef5edfe643b2a5c53
:Do
:# semanage fcontext -a -t FILE_TYPE '.localtimef5edfe643b2a5c53'
:where FILE_TYPE is one of the following: config_usr_t, locale_t. 
:Then execute: 
:restorecon -v '.localtimef5edfe643b2a5c53'
:
:
:*****  Plugin catchall (17.1 confidence) suggests  ***************************
:
:If you believe that systemd-timedated should be allowed create access on the .localtimef5edfe643b2a5c53 lnk_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 systemd-timedat /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:gnomeclock_t:s0
:Target Context                system_u:object_r:etc_t:s0
:Target Objects                .localtimef5edfe643b2a5c53 [ lnk_file ]
:Source                        systemd-timedat
:Source Path                   /usr/lib/systemd/systemd-timedated
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           systemd-195-2.fc18.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.11.1-46.fc18.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.6.3-3.fc18.x86_64 #1 SMP Tue Oct
:                              23 14:55:06 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    2012-10-29 08:21:13 PDT
:Last Seen                     2012-10-29 08:21:13 PDT
:Local ID                      ce7c09e3-1101-4299-aec2-dcaf8904dc9b
:
:Raw Audit Messages
:type=AVC msg=audit(1351524073.599:324): avc:  denied  { create } for  pid=1761 comm="systemd-timedat" name=".localtimef5edfe643b2a5c53" scontext=system_u:system_r:gnomeclock_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=lnk_file
:
:
:type=SYSCALL msg=audit(1351524073.599:324): arch=x86_64 syscall=symlink success=no exit=EACCES a0=7f37d6dd79f0 a1=7f37d6dd8000 a2=7f37d6dd801f a3=20 items=0 ppid=1 pid=1761 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemd-timedat exe=/usr/lib/systemd/systemd-timedated subj=system_u:system_r:gnomeclock_t:s0 key=(null)
:
:Hash: systemd-timedat,gnomeclock_t,etc_t,lnk_file,create
:
:audit2allow
:
:#============= gnomeclock_t ==============
:allow gnomeclock_t etc_t:lnk_file create;
:
:audit2allow -R
:
:#============= gnomeclock_t ==============
:allow gnomeclock_t etc_t:lnk_file create;
:

Comment 1 Steve Tyler 2012-10-29 15:24:21 UTC
Created attachment 635049 [details]
File: type

Comment 2 Steve Tyler 2012-10-29 15:24:23 UTC
Created attachment 635050 [details]
File: hashmarkername

Comment 3 Steve Tyler 2012-10-29 15:37:30 UTC
I was running gnome control center as root, because g-c-c wouldn't let me unlock the date & time control as a regular user -- "Unlock" was not sensitive ...

$ sudo gnome-control-center

Comment 4 Steve Tyler 2012-10-29 18:36:15 UTC
This bug and Bug 871150 can also be reproduced from the command line:
$ sudo timedatectl set-timezone 'America/Los_Angeles'

Script started on Mon 29 Oct 2012 12:27:27 PM MDT
[joeblow@localhost xfr]$ rpm -qa systemd 'selinux*' | sort
selinux-policy-3.11.1-46.fc18.noarch
selinux-policy-devel-3.11.1-46.fc18.noarch
selinux-policy-targeted-3.11.1-46.fc18.noarch
systemd-195-2.fc18.x86_64
[joeblow@localhost xfr]$ sudo timedatectl set-timezone 'America/Los_Angeles'
[sudo] password for joeblow: 
Failed to issue method call: Access denied
[joeblow@localhost xfr]$ exit

Script done on Mon 29 Oct 2012 12:29:40 PM MDT

Comment 5 Miroslav Grepl 2012-10-29 18:50:00 UTC
The problem is the systemd-timedated creates .localtimeXXX link in the /etc, but we are not able to add filename transition for ".localtimeXXX" string.

Comment 6 Daniel Walsh 2012-10-30 19:43:17 UTC
Lets let it create locale_t lnk_files in /etc

Fixed in selinux-policy-3.11.1-48.fc18.noarch

Comment 7 Radek Vokál 2012-10-31 13:56:37 UTC
My timezone is for some reason wrong, I wanted to change it in system settings

Package: (null)
Architecture: i686
OS Release: Fedora release 18 (Spherical Cow)

Comment 8 Miroslav Grepl 2012-10-31 14:35:35 UTC
You can you use the latest build from koji for now. A new update is coming soon.

Comment 9 Kamil Páral 2012-11-02 10:49:29 UTC
I believe I was trying to change my timezone using GNOME GUI tool.

Package: (null)
OS Release: Fedora release 18 (Spherical Cow)

Comment 10 Fedora Update System 2012-11-05 21:07:32 UTC
selinux-policy-3.11.1-50.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-50.fc18

Comment 11 Fedora Update System 2012-11-06 18:55:57 UTC
Package selinux-policy-3.11.1-50.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-50.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-17705/selinux-policy-3.11.1-50.fc18
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2012-12-20 15:36:45 UTC
selinux-policy-3.11.1-50.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


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