RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1184073 - NTP cannot be enabled or disabled using gnome-control-center: SELinux policy denies access.
Summary: NTP cannot be enabled or disabled using gnome-control-center: SELinux policy ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.0
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-20 14:30 UTC by Karol Babioch
Modified: 2016-10-19 00:59 UTC (History)
9 users (show)

Fixed In Version: selinux-policy-3.13.1-24.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 10:25:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2300 0 normal SHIPPED_LIVE selinux-policy bug fix update 2015-11-19 09:55:26 UTC

Description Karol Babioch 2015-01-20 14:30:12 UTC
Description of problem:

Using the gnome-control-center it is not possible to change the NTP status. It cannot be disabled.

Version-Release number of selected component (if applicable):

chrony-1.29.1-1.el7.x86_64
control-center-3.8.6-15.el7.x86_64

How reproducible:

Try to disable NTP using the gnome-control-center


Steps to Reproduce:
1. Go into the Date & Time settings of gnome
2. Try to disable NTP
3. Look into /var/log/messages

Actual results:

- NTP/chrony not disabled

Expected results:

- NTP/chrony disabled


Additional info:

Jan 20 15:26:24 kbabioch dbus-daemon: dbus[985]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
Jan 20 15:26:24 kbabioch dbus[985]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
Jan 20 15:26:24 kbabioch systemd: Starting Time & Date Service...
Jan 20 15:26:24 kbabioch dbus-daemon: dbus[985]: [system] Successfully activated service 'org.freedesktop.timedate1'
Jan 20 15:26:24 kbabioch dbus[985]: [system] Successfully activated service 'org.freedesktop.timedate1'
Jan 20 15:26:24 kbabioch systemd: Started Time & Date Service.
Jan 20 15:26:27 kbabioch systemd: SELinux policy denies access.
Jan 20 15:26:27 kbabioch systemd-timedated: Failed to issue method call: Access denied
Jan 20 15:26:27 kbabioch gnome-session: (gnome-control-center:22241): datetime-cc-panel-WARNING **: Could not set system to use NTP: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: SELinux policy denies access.
Jan 20 15:26:27 kbabioch systemd: SELinux policy denies access.
Jan 20 15:26:27 kbabioch systemd-timedated: Failed to issue method call: Access denied
Jan 20 15:26:27 kbabioch gnome-session: (gnome-control-center:22241): datetime-cc-panel-WARNING **: Could not set system to use NTP: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: SELinux policy denies access.

[root@kbabioch certs]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      28

Comment 1 Karol Babioch 2015-01-20 14:31:32 UTC
Further information about the policies in place:


selinux-policy.noarch                  3.12.1-153.el7_0.13         @internal-it-stage-rhel-x86_64-workstation-7
selinux-policy-targeted.noarch         3.12.1-153.el7_0.13

Comment 2 Karol Babioch 2015-01-20 14:33:04 UTC
Further information about the policies in place:


selinux-policy.noarch                  3.12.1-153.el7_0.13         @internal-it-stage-rhel-x86_64-workstation-7
selinux-policy-targeted.noarch         3.12.1-153.el7_0.13

Comment 4 Karol Babioch 2015-01-20 14:54:14 UTC
This is a line from the audit log:

type=USER_AVC msg=audit(1421765583.172:929): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='avc:  denied  { enable } for auid=-1 uid=-1 gid=-1 path="system" scontext=system_u:system_r:systemd_timedated_t:s0 tcontext=system_u:system_r:init_t:s0 tclass=system  exe="/usr/lib/systemd/systemd" sauid=0 hostname=? addr=? terminal=?'

Comment 5 Milos Malik 2015-01-20 15:47:43 UTC
Are you able to reproduce it on RHEL-7.1 nightly build?

There was some confusion between tclass=system and tclass=service in RHEL-7.0 in systemd tools.

Based on latest RHEL-7.1 policy it should be allowed:

# rpm -qa selinux-policy\*
selinux-policy-3.13.1-16.el7.noarch
selinux-policy-targeted-3.13.1-16.el7.noarch
selinux-policy-doc-3.13.1-16.el7.noarch
selinux-policy-mls-3.13.1-16.el7.noarch
selinux-policy-minimum-3.13.1-16.el7.noarch
selinux-policy-devel-3.13.1-16.el7.noarch
# sesearch -s systemd_timedated_t -p enable -A -C
Found 2 semantic av rules:
   allow systemd_timedated_t chronyd_unit_file_t : service { start stop status reload enable disable } ; 
   allow systemd_timedated_t ntpd_unit_file_t : service { start stop status reload enable disable } ; 
#

Comment 6 Karol Babioch 2015-01-28 08:44:20 UTC
(In reply to Milos Malik from comment #5)
> Are you able to reproduce it on RHEL-7.1 nightly build?
> 
> There was some confusion between tclass=system and tclass=service in
> RHEL-7.0 in systemd tools.
> 
> Based on latest RHEL-7.1 policy it should be allowed:

Yes, I've just tested it and it does work fine with RHEL 7.1. I've only used the RHEL 7.1 ISO (20141204.2), though.

Comment 11 errata-xmlrpc 2015-11-19 10:25:26 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2300.html


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