# Wifi manager type netmgr, domain; type netmgr_exec, exec_type, vendor_file_type, file_type; init_daemon_domain(netmgr) net_domain(netmgr) allow netmgr execns:fd use; # Set ctrl.restart property to restart hostapd when config changes set_prop(netmgr, ctl_default_prop); # Modify hostapd config file allow netmgr hostapd_data_file:file rw_file_perms; allow netmgr hostapd_data_file:dir rw_dir_perms; # Assign addresses to new interfaces as hostapd brings them up allow netmgr self:capability { net_raw net_admin }; allow netmgr self:udp_socket { ioctl }; allowxperm netmgr self:udp_socket ioctl { SIOCSIFADDR SIOCSIFNETMASK SIOCSIFBRDADDR }; # Allow netmgr to run iptables to block and unblock network traffic allow netmgr system_file:file execute_no_trans; allow netmgr system_file:file lock;