1 # userspace wifi access points 2 type hostapd, domain, domain_deprecated; 3 type hostapd_exec, exec_type, file_type; 4 5 net_domain(hostapd) 6 7 allow hostapd self:capability { net_admin net_raw setuid setgid }; 8 allow hostapd self:netlink_socket create_socket_perms; 9 allow hostapd self:netlink_generic_socket create_socket_perms; 10 allow hostapd self:packet_socket create_socket_perms; 11 allow hostapd self:netlink_route_socket nlmsg_write; 12 13 allow hostapd wifi_data_file:file rw_file_perms; 14 allow hostapd wifi_data_file:dir create_dir_perms; 15 type_transition hostapd wifi_data_file:dir wpa_socket "sockets"; 16 type_transition hostapd wifi_data_file:dir wpa_socket "hostapd"; 17 allow hostapd wpa_socket:dir create_dir_perms; 18 allow hostapd wpa_socket:sock_file create_file_perms; 19 allow hostapd netd:fd use; 20 allow hostapd netd:udp_socket { read write }; 21 allow hostapd netd:fifo_file { read write }; 22 # TODO: Investigate whether these inherited sockets should be closed on exec. 23 allow hostapd netd:netlink_kobject_uevent_socket { read write }; 24 allow hostapd netd:netlink_nflog_socket { read write }; 25 allow hostapd netd:netlink_route_socket { read write }; 26 allow hostapd netd:unix_stream_socket { read write }; 27 allow hostapd netd:unix_dgram_socket { read write }; 28