From cbabe363a555a952b71d432df6008410e00fa9b8 Mon Sep 17 00:00:00 2001 From: Christopher Wiley <wiley@google.com> Date: Fri, 22 Jul 2016 14:32:38 -0700 Subject: [PATCH] Give hostapd permissions to use its control socket Bug: 30311493 Test: hostapd starts and stops reliably without complaining about permission to create the control directory, the control socket, or write to the control socket. Change-Id: If8cf57cce5df2c6af06c8b7f28708e40876e948c --- hostapd.te | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hostapd.te b/hostapd.te index 8f8cd6522..62f9cc726 100644 --- a/hostapd.te +++ b/hostapd.te @@ -26,8 +26,7 @@ allow hostapd self:netlink_route_socket nlmsg_write; allow hostapd wifi_data_file:file rw_file_perms; r_dir_file(hostapd, wifi_data_file) -# hostapd needs to bind to (and possibly create) its control interface socket. -allow hostapd hostapd_socket:dir rw_dir_perms; -# hostapd likes to chmod its socket directory. -allow hostapd hostapd_socket:dir setattr; +# hostapd wants to create the directory holding its control socket. +allow hostapd hostapd_socket:dir create_dir_perms; +# hostapd needs to create, bind to, read, and write its control socket. allow hostapd hostapd_socket:sock_file create_file_perms; -- GitLab