Skip to contentSkip to conversation

init: add init_rw_inherited_stream_socket

PATCH New Christian Göttsche 2 participants 2 messages Jan 4, 2018 – Jan 5, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 init: add init_rw_inherited_stream_socket

---
 policy/modules/system/init.if | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
policy/modules/system/init.if +18 -0
index 622bcec57..326581ecc 100644
@@ -889,6 +889,24 @@ interface(`init_dgram_send',`
 	allow $1 init_t:unix_stream_socket getattr;
 ')
 
+########################################
+## <summary>
+##	Read and write to inherited init unix streams.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`init_rw_inherited_stream_socket',`
+	gen_require(`
+		type init_t;
+	')
+
+	allow $1 init_t:unix_stream_socket { getattr read write ioctl };
+')
+
 ########################################
 ## <summary>
 ##	Allow the specified domain to read/write to
Signature · 1 line
2.15.1
#1 lore raw

PATCH 1/1 init: add init_rw_inherited_stream_socket

Quoted 23 lines · Christian G?ttsche via refpolicy
---
  policy/modules/system/init.if | 18 ++++++++++++++++++
  1 file changed, 18 insertions(+)
policy/modules/system/init.if +11 -0
index 622bcec57..326581ecc 100644
@@ -889,6 +889,24 @@ interface(`init_dgram_send',`
  	allow $1 init_t:unix_stream_socket getattr;
  ')
 
+########################################
+## <summary>
+##	Read and write to inherited init unix streams.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`init_rw_inherited_stream_socket',`

policy/modules/system/init.if interface(`init_dgram_send',` · line 912

Quoted 10 lines
policy/modules/system/init.if +7 -0
+	gen_require(`
+		type init_t;
+	')
+
+	allow $1 init_t:unix_stream_socket { getattr read write ioctl };
+')
+
  ########################################
  ## <summary>
  ##	Allow the specified domain to read/write to

Merged.

Signature · 1 line
Chris PeBenito