All of lore.kernel.org
 help / color / mirror / Atom feed
* [refpolicy] [PATCH 1/1] Add interface for ntp_dbus_chat
@ 2017-12-19 21:01 David Sugar
  2017-12-20 15:40 ` Dominick Grift
  0 siblings, 1 reply; 8+ messages in thread
From: David Sugar @ 2017-12-19 21:01 UTC (permalink / raw)
  To: refpolicy

I'm seeing dbus send_msg denials when using timedatectl.  This adds interface to allow the communication.

type=USER_AVC msg=audit(1513693376.372:155): pid=667 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=SetNTP dest=org.freedesktop.timedate1 spid=1037 tpid=1038 scontext=staff_u:sysadm_r:applyconfig_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=?'

---
 ntp.if | 28 ++++++++++++++++++++++------
 1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/ntp.if b/ntp.if
index 00c7620..a6fe5b7 100644
--- a/ntp.if
+++ b/ntp.if
@@ -177,6 +177,27 @@ interface(`ntp_rw_shm',`
         fs_search_tmpfs($1)
 ')

+########################################
+## <summary>
+##     Send and receive messages from
+##     ntp over dbus.
+## </summary>
+## <param name="domain">
+##     <summary>
+##     Domain allowed access.
+##     </summary>
+## </param>
+#
+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;
+')
+
 ########################################
 ## <summary>
 ##      All of the rules required to
@@ -225,11 +246,6 @@ interface(`ntp_admin',`
         ntp_run($1, $2)

         ifdef(`init_systemd',`
-               gen_require(`
-                       class dbus send_msg;
-               ')
-
-               allow $1 ntpd_t:dbus send_msg;
-               allow ntpd_t $1:dbus send_msg;
+               ntp_dbus_chat($1)
         ')
 ')
--
2.14.3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.tresys.com/pipermail/refpolicy/attachments/20171219/120fb36f/attachment.html 

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-01-02 21:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-19 21:01 [refpolicy] [PATCH 1/1] Add interface for ntp_dbus_chat David Sugar
2017-12-20 15:40 ` Dominick Grift
2017-12-20 18:10   ` David Sugar
2017-12-20 18:15     ` Dominick Grift
2017-12-20 18:28   ` David Sugar
2017-12-26 10:24     ` Chris PeBenito
2017-12-26 11:30       ` Dominick Grift
2018-01-02 21:44         ` David Sugar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.