Bug 954135 - SELinux is preventing /usr/lib/systemd/systemd-timedated from 'create' accesses on the file .adjtimeAKz6u2.
SELinux is preventing /usr/lib/systemd/systemd-timedated from 'create' access...
Status: CLOSED DUPLICATE of bug 881577
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
i686 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-04-21 02:19 EDT by vikram goyal
Modified: 2013-04-23 03:17 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-04-23 03:17:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description vikram goyal 2013-04-21 02:19:35 EDT
Description of problem:
I have dual boot system. At install time I selectd Hardware Clock set to UTC & selected my local time zone for time adjustement. But windows XP interprets the hardware time as localtime which causes problem.

I tried reseting the setting of Hardware Clock to UTC to Local Time Zone. I executed the following command for that:

timedatectl set-local-rtc 1 through user root.

I think this access should be allowed if root is executing the command else how may I change the setting.
SELinux is preventing /usr/lib/systemd/systemd-timedated from 'create' accesses on the file .adjtimeAKz6u2.

*****  Plugin catchall_labels (83.8 confidence) suggests  ********************

If you want to allow systemd-timedated to have create access on the .adjtimeAKz6u2 file
Then you need to change the label on .adjtimeAKz6u2
# semanage fcontext -a -t FILE_TYPE '.adjtimeAKz6u2'
where FILE_TYPE is one of the following: config_home_t, config_usr_t, locale_t, systemd_passwd_var_run_t, xserver_etc_t. 
Then execute: 
restorecon -v '.adjtimeAKz6u2'

*****  Plugin catchall (17.1 confidence) suggests  ***************************

If you believe that systemd-timedated should be allowed create access on the .adjtimeAKz6u2 file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
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:systemd_timedated_t:s0
Target Context                system_u:object_r:etc_t:s0
Target Objects                .adjtimeAKz6u2 [ file ]
Source                        systemd-timedat
Source Path                   /usr/lib/systemd/systemd-timedated
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-197-1.fc18.2.i686
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-91.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.8.8-202.fc18.i686 #1 SMP Wed Apr
                              17 23:46:26 UTC 2013 i686 i686
Alert Count                   1
First Seen                    2013-04-21 11:39:52 IST
Last Seen                     2013-04-21 11:39:52 IST
Local ID                      5e28c52e-2c89-421b-b586-e5717fa9077f

Raw Audit Messages
type=AVC msg=audit(1366524592.605:405): avc:  denied  { create } for  pid=8901 comm="systemd-timedat" name=".adjtimeAKz6u2" scontext=system_u:system_r:systemd_timedated_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=file

type=SYSCALL msg=audit(1366524592.605:405): arch=i386 syscall=open success=no exit=EACCES a0=b8d0fa68 a1=880c2 a2=180 a3=1fcac items=0 ppid=1 pid=8901 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=systemd-timedat exe=/usr/lib/systemd/systemd-timedated subj=system_u:system_r:systemd_timedated_t:s0 key=(null)

Hash: systemd-timedat,systemd_timedated_t,etc_t,file,create


#============= systemd_timedated_t ==============
allow systemd_timedated_t etc_t:file create;

audit2allow -R
require {
	type systemd_timedated_t;

#============= systemd_timedated_t ==============

Additional info:
hashmarkername: setroubleshoot
kernel:         3.8.8-202.fc18.i686
type:           libreport
Comment 1 Miroslav Grepl 2013-04-23 03:17:06 EDT
Please update to use the latest systemd package.

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

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