commit:     e90c8ba7ec87789c618bdac926e0af6baf3da89c
Author:     Laurent Bigonville <bigon <AT> bigon <DOT> be>
AuthorDate: Sun Nov 11 12:33:28 2018 +0000
Commit:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Sun Nov 18 10:56:47 2018 +0000
URL:        
https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=e90c8ba7

Allow sysnet_dns_name_resolve() to use resolved to resolve DNS names

Also allow unconfined_t to talk with the resolved daemon

Signed-off-by: Jason Zaman <jason <AT> perfinion.com>

 policy/modules/system/sysnetwork.if | 11 ++++++++---
 policy/modules/system/unconfined.te |  6 ++++++
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/policy/modules/system/sysnetwork.if 
b/policy/modules/system/sysnetwork.if
index f4f17a5d..15fc046c 100644
--- a/policy/modules/system/sysnetwork.if
+++ b/policy/modules/system/sysnetwork.if
@@ -756,9 +756,14 @@ interface(`sysnet_dns_name_resolve',`
                nscd_use($1)
        ')
 
-       # This seems needed when the mymachines NSS module is used
-       optional_policy(`
-               systemd_read_machines($1)
+       ifdef(`init_systemd',`
+               optional_policy(`
+                       systemd_dbus_chat_resolved($1)
+               ')
+               # This seems needed when the mymachines NSS module is used
+               optional_policy(`
+                       systemd_read_machines($1)
+               ')
        ')
 ')
 

diff --git a/policy/modules/system/unconfined.te 
b/policy/modules/system/unconfined.te
index d669ff16..b981fa85 100644
--- a/policy/modules/system/unconfined.te
+++ b/policy/modules/system/unconfined.te
@@ -58,6 +58,12 @@ ifdef(`direct_sysadm_daemon',`
         ')
 ')
 
+ifdef(`init_systemd',`
+       optional_policy(`
+               systemd_dbus_chat_resolved(unconfined_t)
+       ')
+')
+
 optional_policy(`
        ada_domtrans(unconfined_t)
 ')

Reply via email to