platform_system_sepolicy/hostapd.te
Stephen Smalley f20673712b Update hostapd domain for /data/misc/wifi/sockets label change.
Change I9e35cc93abf89ce3594860aa3193f84a3b42ea6e changed the type
on /data/misc/wifi/sockets to wpa_socket and change
I51b09c5e40946673a38732ea9f601b2d047d3b62 fixed the type on existing
devices.  Consequently hostapd now needs access to wpa_socket dir
and sock_file.

Change-Id: I58f552b3cd55821f57e6ef33ebe6bb8587e7b3fd
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-02-11 10:50:07 -05:00

22 lines
986 B
Text

# userspace wifi access points
type hostapd, domain;
permissive_or_unconfined(hostapd)
type hostapd_exec, exec_type, file_type;
allow hostapd self:capability { net_admin net_raw setuid setgid };
allow hostapd self:netlink_socket create_socket_perms;
allow hostapd self:packet_socket { create write read };
allow hostapd self:netlink_route_socket { bind create write nlmsg_write read };
allow hostapd self:udp_socket { create ioctl };
allow hostapd wifi_data_file:file rw_file_perms;
allow hostapd wifi_data_file:dir create_dir_perms;
allow hostapd wpa_socket:dir create_dir_perms;
allow hostapd wpa_socket:sock_file create_file_perms;
allow hostapd netd:fd use;
allow hostapd netd:udp_socket { read write };
allow hostapd netd:netlink_kobject_uevent_socket { read write };
allow hostapd netd:netlink_nflog_socket { read write };
allow hostapd netd:netlink_route_socket { read write };
allow hostapd netd:unix_stream_socket { read write };
allow hostapd netd:fifo_file { read write };