Skip to contentSkip to conversation

hostname: do not audit attempts by hostname to read and write dhcpc udp sockets (looks like a leaked fd)

PATCH Superseded Dominick Grift 1 participant 1 message Sep 27, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hostname: do not audit attempts by hostname to read and write dhcpc udp sockets (looks like a leaked fd)

policy/modules/system/hostname.te +1 -0
index f6cbda9..380197b 100644
@@ -51,6 +51,7 @@
 
 miscfiles_read_localization(hostname_t)
 
+sysnet_dontaudit_rw_dhcpc_udp_sockets(hostname_t)
 sysnet_dontaudit_rw_dhcpc_unix_stream_sockets(hostname_t)
 sysnet_read_config(hostname_t)
 sysnet_dns_name_resolve(hostname_t)
policy/modules/system/sysnetwork.if +21 -0
index fb0b50e..3e34d34 100644
@@ -17,6 +17,8 @@
 
 	corecmd_search_bin($1)
 	domtrans_pattern($1, dhcpc_exec_t, dhcpc_t)
+
+	
 ')
 
 ########################################
@@ -47,6 +49,25 @@
 
 ########################################
 ## <summary>
+##	Do not audit attempts to read and
+##	write dhcpc udp socket descriptors.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain to not audit.
+##	</summary>
+## </param>
+#
+interface(`sysnet_dontaudit_rw_dhcpc_udp_sockets',`
+	gen_require(`
+		type dhcpc_t;
+	')
+
+	dontaudit $1 dhcpc_t:udp_socket { read write };
+')
+
+########################################
+## <summary>
 ##	Do not audit attempts to use
 ##	the dhcp file descriptors.
 ## </summary>