selinux-refpolicy.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Sugar, David" <dsugar@tresys.com>
To: "selinux-refpolicy@vger.kernel.org"  <selinux-refpolicy@vger.kernel.org>
Subject: [PATCH] Add interface to start/stop iptables service
Date: Fri, 11 Jan 2019 15:30:52 +0000	[thread overview]
Message-ID: <20190111153011.27275-2-dsugar@tresys.com> (raw)
In-Reply-To: <20190111153011.27275-1-dsugar@tresys.com>

Signed-off-by: Dave Sugar <dsugar@tresys.com>
---
 policy/modules/system/iptables.if | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/policy/modules/system/iptables.if b/policy/modules/system/iptables.if
index 725a6a3d..a36277a6 100644
--- a/policy/modules/system/iptables.if
+++ b/policy/modules/system/iptables.if
@@ -183,6 +183,25 @@ interface(`iptables_dontaudit_read_pids',`
 	dontaudit $1 iptables_runtime_t:file read;
 ')
 
+########################################
+## <summary>
+##	Allow specified domain to start and stop iptables service
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`iptables_startstop',`
+	gen_require(`
+		type iptables_unit_t;
+		class service { start stop };
+	')
+
+	allow $1 iptables_unit_t:service { start stop };
+')
+
 ########################################
 ## <summary>
 ##	Allow specified domain to get status of iptables service
-- 
2.20.1


  reply	other threads:[~2019-01-11 15:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-11 15:30 [PATCH] Add interface to create unit files with specified type via filetrans Sugar, David
2019-01-11 15:30 ` Sugar, David [this message]
2019-01-12 19:32   ` [PATCH] Add interface to start/stop iptables service Chris PeBenito
2019-01-11 15:30 ` [PATCH] Alternate ClamAV temp directory Sugar, David
2019-01-12 19:34   ` Chris PeBenito
2019-01-15 21:31     ` Sugar, David
2019-01-11 15:30 ` [PATCH 1/2] Interface with systemd_hostnamed over dbus to set hostname Sugar, David
2019-01-11 15:30 ` [PATCH 2/2] Setup private type for /etc/hostname Sugar, David
2019-01-12  1:11   ` Russell Coker
2019-01-12  3:49     ` Sugar, David
2019-01-12 19:30 ` [PATCH] Add interface to create unit files with specified type via filetrans Chris PeBenito
2019-01-15 21:27   ` Sugar, David

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=20190111153011.27275-2-dsugar@tresys.com \
    --to=dsugar@tresys.com \
    --cc=selinux-refpolicy@vger.kernel.org \
    /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).