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