commit:     3ae0485c2f5e5d0a666ad48895df6ea4993b19fd
Author:     Jason Zaman <jason <AT> perfinion <DOT> com>
AuthorDate: Sun Apr 22 16:13:34 2018 +0000
Commit:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Wed Apr 25 04:08:35 2018 +0000
URL:        
https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=3ae0485c

sysnetwork: put systemd_read_resolved_runtime in an ifdef

commit f865919872a2d709d37f3df7032a6ea73bdd8080
(Interface to read /run/systemd/resolve/resolv.conf)
Added an interface to sysnet_read_config which requires the systemd
module loaded. Putting the interface in an optional_policy() is not
possible since sysnet_read_config is called from several tunables so
we use an ifdef.

 policy/modules/system/sysnetwork.if | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/policy/modules/system/sysnetwork.if 
b/policy/modules/system/sysnetwork.if
index e9dc5401..693a26c6 100644
--- a/policy/modules/system/sysnetwork.if
+++ b/policy/modules/system/sysnetwork.if
@@ -348,7 +348,9 @@ interface(`sysnet_read_config',`
        files_search_etc($1)
        allow $1 net_conf_t:file read_file_perms;
 
-       systemd_read_resolved_runtime($1)
+       ifdef(`init_systemd',`
+               systemd_read_resolved_runtime($1)
+       ')
 
        ifdef(`distro_debian',`
                files_search_pids($1)

Reply via email to