Skip to contentSkip to conversation

Add interface to get status of iptables service

PATCH In review Sugar, David 2 participants 2 messages Jan 7, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add interface to get status of iptables service

---
 policy/modules/system/iptables.if | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
policy/modules/system/iptables.if +19 -0
index 7d8f1821..725a6a3d 100644
@@ -183,6 +183,25 @@ interface(`iptables_dontaudit_read_pids',`
 	dontaudit $1 iptables_runtime_t:file read;
 ')
 
+########################################
+## <summary>
+##	Allow specified domain to get status of iptables service
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`iptables_status',`
+	gen_require(`
+		type iptables_unit_t;
+		class service status;
+	')
+
+	allow $1 iptables_unit_t:service status;
+')
+
 ########################################
 ## <summary>
 ##	All of the rules required to
Signature · 1 line
2.20.1
#1 lore raw
Quoted 25 lines · David
---
  policy/modules/system/iptables.if | 19 +++++++++++++++++++
  1 file changed, 19 insertions(+)
policy/modules/system/iptables.if +12 -0
index 7d8f1821..725a6a3d 100644
@@ -183,6 +183,25 @@ interface(`iptables_dontaudit_read_pids',`
  	dontaudit $1 iptables_runtime_t:file read;
  ')
 
+########################################
+## <summary>
+##	Allow specified domain to get status of iptables service
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`iptables_status',`
+	gen_require(`

policy/modules/system/iptables.if interface(`iptables_dontaudit_read_pids',` · line 207

Quoted 10 lines
policy/modules/system/iptables.if +7 -0
+		type iptables_unit_t;
+		class service status;
+	')
+
+	allow $1 iptables_unit_t:service status;
+')
+
  ########################################
  ## <summary>
  ##	All of the rules required to

Merged.

Signature · 1 line
Chris PeBenito