Skip to contentSkip to conversation

hostname daemon init hostname from dhcpcd, try 3

PATCH New Chris Richards 1 participant 1 message Dec 29, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 hostname daemon init hostname from dhcpcd, try 3

hostnamed cannot update system hostname with information obtained from dhcpcd.

Add interface to sysnetwork.if allowing rw access to unix stream sockets on dhcpc_t

---
 policy/modules/system/sysnetwork.if |   19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
policy/modules/system/sysnetwork.if +19 -0
index 8e71fb7..7e31057 100644
@@ -231,6 +236,25 @@ interface(`sysnet_read_dhcpc_state',`
 	read_files_pattern($1, dhcpc_state_t, dhcpc_state_t)
 ')
 
+########################################
+## <summary>
+##	Read and write the dhcp client unix
+##	stream socket.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`sysnet_rw_dhcpc_stream_sockets',`
+	gen_require(`
+		type dhcpc_t;
+	')
+
+	allow $1 dhcpc_t:unix_stream_socket { read write };
+')
+
 #######################################
 ## <summary>
 ##	Delete the dhcp client state files.
Signature · 1 line
1.7.3.4