1# HwBinder IPC from client to server
2binder_call(hal_wifi_hostapd_client, hal_wifi_hostapd_server)
3binder_call(hal_wifi_hostapd_server, hal_wifi_hostapd_client)
4
5add_hwservice(hal_wifi_hostapd_server, hal_wifi_hostapd_hwservice)
6allow hal_wifi_hostapd_client hal_wifi_hostapd_hwservice:hwservice_manager find;
7
8allow hal_wifi_hostapd_server self:global_capability_class_set { net_admin net_raw };
9
10allow hal_wifi_hostapd_server sysfs_net:dir search;
11
12# Allow hal_wifi_hostapd to access /proc/net/psched
13allow hal_wifi_hostapd_server proc_net:file { getattr open read };
14
15# Various socket permissions.
16allowxperm hal_wifi_hostapd_server self:udp_socket ioctl priv_sock_ioctls;
17allow hal_wifi_hostapd_server self:netlink_socket create_socket_perms_no_ioctl;
18allow hal_wifi_hostapd_server self:netlink_generic_socket create_socket_perms_no_ioctl;
19allow hal_wifi_hostapd_server self:packet_socket create_socket_perms_no_ioctl;
20allow hal_wifi_hostapd_server self:netlink_route_socket nlmsg_write;
21
22###
23### neverallow rules
24###
25
26# hal_wifi_hostapd should not trust any data from sdcards
27neverallow hal_wifi_hostapd_server sdcard_type:dir ~getattr;
28neverallow hal_wifi_hostapd_server sdcard_type:file *;
29