From: gizmo@giz-works.com (Chris Richards) Date: Wed, 29 Dec 2010 00:42:47 -0600 Subject: [refpolicy] [PATCH 1/2] hostname daemon init hostname from dhcpcd, try 3 Message-ID: <1293604967-2527-1-git-send-email-gizmo@giz-works.com> To: refpolicy@oss.tresys.com List-Id: refpolicy.oss.tresys.com 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 Signed-off-by: Chris Richards --- policy/modules/system/sysnetwork.if | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/policy/modules/system/sysnetwork.if b/policy/modules/system/sysnetwork.if index 8e71fb7..7e31057 100644 --- a/policy/modules/system/sysnetwork.if +++ b/policy/modules/system/sysnetwork.if @@ -231,6 +236,25 @@ interface(`sysnet_read_dhcpc_state',` read_files_pattern($1, dhcpc_state_t, dhcpc_state_t) ') +######################################## +## +## Read and write the dhcp client unix +## stream socket. +## +## +## +## Domain allowed access. +## +## +# +interface(`sysnet_rw_dhcpc_stream_sockets',` + gen_require(` + type dhcpc_t; + ') + + allow $1 dhcpc_t:unix_stream_socket { read write }; +') + ####################################### ## ## Delete the dhcp client state files. -- 1.7.3.4