summaryrefslogtreecommitdiff
path: root/sepolicy/hostapd.te
AgeCommit message (Collapse)Author
2018-05-14sepolicy: Fix hostapd restart and other relevant dnsmasq and proc_net ↵Amit Pundir
permissions We run into following logcat errors if we enable/disable WiFi hotspot a few times: E hostapd : Could not unlink existing ctrl_iface socket '/data/misc/wifi/hostapd/ctrl/wlan0': Permission denied E hostapd : Failed to setup control interface for wlan0 E hostapd : wlan0: Unable to setup interface. .. .. E dnsmasq : fstat(14) error: 13/Permission denied E dnsmasq : fstat(16) error: 13/Permission denied .. .. Add corresponding hostapd, dnsmasq and proc_net sepolicies as pointed out by audit2allow. Change-Id: I7375d0673ebd7617cbf14a473deb37cfb425c063 Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2018-05-02Get hostapd workingAmit Pundir
db820c/db410c boards need lib_driver_cmd_qcwcn private lib to get hostapd working, otherwise WiFi Sta keep waiting for IP address to be assigned for some reason and times out eventually. Copied standard hostapd policies, vendor_init.te and hostapd.te, from hikey. And added audit2allow policies in hostapd.te to get it working in enforcing mode. Without these audit2allow policies we run into following errors in logcat: E hostapd : mkdir[ctrl_interface]: Permission denied E hostapd : Failed to setup control interface for wlan0 E hostapd : wlan0: Unable to setup interface. I hostapd : wlan0: interface state UNINITIALIZED->DISABLED I hostapd : wlan0: AP-DISABLED I hostapd : wlan0: CTRL-EVENT-TERMINATING E hostapd : hostapd_free_hapd_data: Interface wlan0 wasn't started I hostapd : nl80211: deinit ifname=wlan0 disabled_11b_rates=0 init: Service 'hostapd' (pid 3588) exited with status 1 With these audit2allow policies: E hostapd : Using interface wlan0 with hwaddr xx:xx:xx:xx:xx:xx and ssid "AndroidAP_1242" D SoftApManager: SoftAp is ready for use I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true I hostapd : wlan0: interface state UNINITIALIZED->ENABLED I hostapd : wlan0: AP-ENABLED Change-Id: I4f7076ef09249c5f9531fa2bd355e5f35bdd2dfe Signed-off-by: Amit Pundir <amit.pundir@linaro.org>