commit:     cb663b200b61b96128f908d286ef1370b8c5cd1c
Author:     Antoine Tenart <antoine.tenart <AT> bootlin <DOT> com>
AuthorDate: Mon Oct  5 14:54:57 2020 +0000
Commit:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Sun Oct 11 21:14:40 2020 +0000
URL:        
https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=cb663b20

ntp: allow systemd-timesyn to watch dbus objects

Fixes:

avc:  denied  { watch } for  pid=68 comm="systemd-timesyn"
path="/run/dbus" dev="tmpfs" ino=2707 scontext=system_u:system_r:ntpd_t
tcontext=system_u:object_r:system_dbusd_runtime_t tclass=dir
permissive=1

avc:  denied  { watch } for  pid=68 comm="systemd-timesyn"
path="/run/dbus/system_bus_socket" dev="tmpfs" ino=2716
scontext=system_u:system_r:ntpd_t
tcontext=system_u:object_r:system_dbusd_runtime_t tclass=sock_file
permissive=1

Signed-off-by: Antoine Tenart <antoine.tenart <AT> bootlin.com>
Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org>

 policy/modules/services/ntp.te | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/policy/modules/services/ntp.te b/policy/modules/services/ntp.te
index 86bfc9ff..b9cc0ea2 100644
--- a/policy/modules/services/ntp.te
+++ b/policy/modules/services/ntp.te
@@ -145,6 +145,8 @@ ifdef(`init_systemd',`
 
        dbus_system_bus_client(ntpd_t)
        dbus_connect_system_bus(ntpd_t)
+       dbus_watch_system_bus_runtime_dirs(ntpd_t)
+       dbus_watch_system_bus_runtime_named_sockets(ntpd_t)
        init_dbus_chat(ntpd_t)
        init_get_system_status(ntpd_t)
        init_list_unit_dirs(ntpd_t)

Reply via email to