Bug 1211766 - SELinux is preventing chronyd from 'read' accesses on the lnk_file localtime.
Summary: SELinux is preventing chronyd from 'read' accesses on the lnk_file localtime.
Keywords:
Status: CLOSED DUPLICATE of bug 1190377
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 22
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:a29ef543dcf53468443817e5ecd...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-14 20:25 UTC by Dan Mossor [danofsatx]
Modified: 2015-04-15 14:28 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-15 14:28:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dan Mossor [danofsatx] 2015-04-14 20:25:49 UTC
Description of problem:
In the F22 Beta RC2 Workstation Live environment, set the time zone through the Settings > Date & Time applet. Turn Network time off and/or On, and this AVC is generated.
SELinux is preventing chronyd from 'read' accesses on the lnk_file localtime.

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

If you want to allow chronyd to have read access on the localtime lnk_file
Then you need to change the label on localtime
Do
# semanage fcontext -a -t FILE_TYPE 'localtime'
where FILE_TYPE is one of the following: admin_home_t, bin_t, boot_t, cert_t, courier_exec_t, device_t, devlog_t, etc_runtime_t, etc_t, exim_exec_t, file_context_t, fonts_cache_t, fonts_t, gpsd_tmpfs_t, ld_so_t, lib_t, locale_t, man_cache_t, man_t, net_conf_t, postfix_postdrop_t, proc_t, root_t, rpm_script_tmp_t, security_t, sendmail_exec_t, shell_exec_t, src_t, sssd_var_lib_t, sysfs_t, system_conf_t, system_db_t, textrel_shlib_t, timemaster_tmpfs_t, tmp_t, usr_t, var_run_t, var_t. 
Then execute: 
restorecon -v 'localtime'


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

If you believe that chronyd should be allowed read access on the localtime 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 chronyd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:chronyd_t:s0
Target Context                system_u:object_r:default_t:s0
Target Objects                localtime [ lnk_file ]
Source                        chronyd
Source Path                   chronyd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-119.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.0.0-0.rc5.git4.1.fc22.x86_64 #1
                              SMP Fri Mar 27 13:51:23 UTC 2015 x86_64 x86_64
Alert Count                   1
First Seen                    2015-04-14 15:20:36 CDT
Last Seen                     2015-04-14 15:20:36 CDT
Local ID                      29f53ab8-36f9-41f5-b614-051b8be90dbd

Raw Audit Messages
type=AVC msg=audit(1429042836.620:640): avc:  denied  { read } for  pid=2848 comm="chronyd" name="localtime" dev="dm-3" ino=326250 scontext=system_u:system_r:chronyd_t:s0 tcontext=system_u:object_r:default_t:s0 tclass=lnk_file permissive=0


Hash: chronyd,chronyd_t,default_t,lnk_file,read

Version-Release number of selected component:
selinux-policy-3.13.1-119.fc22.noarch

Additional info:
reporter:       libreport-2.5.0
hashmarkername: setroubleshoot
kernel:         4.0.0-0.rc5.git4.1.fc22.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2015-04-15 14:28:18 UTC

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


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