selinux-refpolicy.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jason@perfinion.com (Jason Zaman)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH] sysnetwork: put systemd_read_resolved_runtime in an ifdef
Date: Wed, 25 Apr 2018 12:03:16 +0800	[thread overview]
Message-ID: <20180425040316.54650-1-jason@perfinion.com> (raw)

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 1f7cf460..e6e4246d 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)
-- 
2.16.1

             reply	other threads:[~2018-04-25  4:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-25  4:03 Jason Zaman [this message]
2018-04-25 21:30 ` [refpolicy] [PATCH] sysnetwork: put systemd_read_resolved_runtime in an ifdef Chris PeBenito

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180425040316.54650-1-jason@perfinion.com \
    --to=jason@perfinion.com \
    --cc=refpolicy@oss.tresys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).