2017-03-23 22:27:32 +01:00
|
|
|
typeattribute wificond coredomain;
|
|
|
|
|
2020-06-25 14:20:42 +02:00
|
|
|
set_prop(wificond, wifi_hal_prop)
|
2020-03-04 09:20:35 +01:00
|
|
|
set_prop(wificond, wifi_prop)
|
|
|
|
set_prop(wificond, ctl_default_prop)
|
|
|
|
|
|
|
|
get_prop(wificond, hwservicemanager_prop)
|
|
|
|
|
2021-06-15 17:01:16 +02:00
|
|
|
allow wificond legacykeystore_service:service_manager find;
|
|
|
|
|
2016-07-22 22:13:11 +02:00
|
|
|
init_daemon_domain(wificond)
|
2024-03-27 09:18:41 +01:00
|
|
|
|
|
|
|
binder_use(wificond)
|
|
|
|
binder_call(wificond, system_server)
|
|
|
|
binder_call(wificond, keystore)
|
|
|
|
|
|
|
|
add_service(wificond, wifinl80211_service)
|
|
|
|
hal_client_domain(wificond, hal_nlinterceptor)
|
|
|
|
|
|
|
|
# create sockets to set interfaces up and down
|
|
|
|
allow wificond self:udp_socket create_socket_perms;
|
|
|
|
# setting interface state up/down is a privileged ioctl
|
|
|
|
allowxperm wificond self:udp_socket ioctl { SIOCSIFFLAGS SIOCSIFHWADDR };
|
|
|
|
allow wificond self:global_capability_class_set { net_admin net_raw };
|
|
|
|
# allow wificond to speak to nl80211 in the kernel
|
|
|
|
allow wificond self:netlink_socket create_socket_perms_no_ioctl;
|
|
|
|
# newer kernels (e.g. 4.4 but not 4.1) have a new class for sockets
|
|
|
|
allow wificond self:netlink_generic_socket create_socket_perms_no_ioctl;
|
|
|
|
|
|
|
|
r_dir_file(wificond, proc_net_type)
|
|
|
|
|
|
|
|
# allow wificond to check permission for dumping logs
|
|
|
|
allow wificond permission_service:service_manager find;
|
|
|
|
|
|
|
|
# dumpstate support
|
|
|
|
allow wificond dumpstate:fd use;
|
|
|
|
allow wificond dumpstate:fifo_file write;
|
|
|
|
|
|
|
|
#### Offer the Wifi Keystore HwBinder service ###
|
|
|
|
hwbinder_use(wificond)
|
|
|
|
typeattribute wificond wifi_keystore_service_server;
|
|
|
|
add_hwservice(wificond, system_wifi_keystore_hwservice)
|
|
|
|
|
|
|
|
# Allow keystore2 binder access to serve the HwBinder service.
|
|
|
|
allow wificond keystore_service:service_manager find;
|
|
|
|
allow wificond wifi_key:keystore2_key {
|
|
|
|
get_info
|
|
|
|
use
|
|
|
|
};
|