From a50afdcc84b573fac7f96abbba1133fd80dad821 Mon Sep 17 00:00:00 2001 From: "Sugar, David" Date: Wed, 20 Mar 2019 00:20:33 +0000 Subject: [PATCH] Add interface ntp_dbus_chat type=USER_AVC msg=audit(1553013821.622:9900): pid=7377 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc: denied { send_msg } for msgtype=method_call interface=org.freedesktop.timedate1 member=SetTimezone dest=org.freedesktop.timedate1 spid=16280 tpid=16281 scontext=sysadm_u:sysadm_r:settings_t:s0-s0:c0.c1023 tcontext=system_u:system_r:ntpd_t:s0 tclass=dbus exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?' type=USER_AVC msg=audit(1553013821.625:9911): pid=7377 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc: denied { send_msg } for msgtype=method_return dest=:1.258 spid=16281 tpid=16280 scontext=system_u:system_r:ntpd_t:s0 tcontext=sysadm_u:sysadm_r:settings_t:s0-s0:c0.c1023 tclass=dbus exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?' Signed-off-by: Dave Sugar --- policy/modules/services/ntp.if | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/policy/modules/services/ntp.if b/policy/modules/services/ntp.if index f1a90c558..7fa20c8d8 100644 --- a/policy/modules/services/ntp.if +++ b/policy/modules/services/ntp.if @@ -79,6 +79,27 @@ interface(`ntp_run',` roleattribute $2 ntpd_roles; ') +######################################## +## +## Send and receive messages from +## ntpd over dbus. +## +## +## +## Domain allowed access. +## +## +# +interface(`ntp_dbus_chat',` + gen_require(` + type ntpd_t; + class dbus send_msg; + ') + + allow $1 ntpd_t:dbus send_msg; + allow ntpd_t $1:dbus send_msg; +') + ######################################## ## ## Execute ntpdate server in the ntpd domain.