android_device_google_lynx/vendor/lowi_server.te
Hsiu-Chang Chen b2c724f0ed Add sepolicy rules for hal_wifi_default
In PDK build, it uses default wifi hal instead
wifi_ext hal. Need to add rules for hal_wifi_default
as well as we added for hal_wifi_ext

Bug: 253544307
Test: Wifi can be enabled in PDK builds
Change-Id: I57ad330c2467ae99b9c5190fbdc2f02e998b2fc1
2022-10-15 02:50:33 +00:00

37 lines
1.4 KiB
Plaintext

# lowi_server service
# which launches various other services supporting Wifi-RTT (LOWI) vendor_location
type lowi_server, domain;
type lowi_server_exec, exec_type, vendor_file_type, file_type;
hwbinder_use(lowi_server)
allow lowi_server self:udp_socket create_socket_perms;
allow lowi_server self:netlink_route_socket create_socket_perms_no_ioctl;
## lowi-server
##############
allow lowi_server vendor_location:fd use;
allow lowi_server vendor_location:unix_dgram_socket {sendto read write};
# some additional network access
allow lowi_server self:netlink_generic_socket create_socket_perms_no_ioctl;
allowxperm lowi_server self:udp_socket ioctl lowi_server_ioctls;
# /data/vendor/wifi
allow lowi_server vendor_wifi_vendor_data_file:dir rw_dir_perms;
# /data/vendor/wifi/wpa
allow lowi_server wpa_data_file:dir rw_dir_perms;
allow lowi_server wpa_data_file:sock_file create_file_perms;
allow lowi_server hal_wifi_supplicant_default:unix_dgram_socket sendto;
# /dev/socket/wifihal
allow lowi_server vendor_wifihal_socket:dir rw_dir_perms;
allow lowi_server vendor_wifihal_socket:sock_file create_file_perms;
allow lowi_server vendor_wifihal_socket:unix_dgram_socket sendto;
unix_socket_send(lowi_server, vendor_wifihal, hal_wifi_default);
unix_socket_send(lowi_server, vendor_wifihal, hal_wifi_ext);
# /dev/socket/vendor_location
allow lowi_server vendor_location_socket:{sock_file lnk_file} create_file_perms;
allow lowi_server vendor_location_socket:dir rw_dir_perms;