1# wificond
2type wificond, domain;
3type wificond_exec, system_file_type, exec_type, file_type;
4
5binder_use(wificond)
6binder_call(wificond, system_server)
7binder_call(wificond, keystore)
8
9add_service(wificond, wifinl80211_service)
10
11set_prop(wificond, exported_wifi_prop)
12set_prop(wificond, wifi_prop)
13set_prop(wificond, ctl_default_prop)
14
15# create sockets to set interfaces up and down
16allow wificond self:udp_socket create_socket_perms;
17# setting interface state up/down is a privileged ioctl
18allowxperm wificond self:udp_socket ioctl { SIOCSIFFLAGS SIOCSIFHWADDR };
19allow wificond self:global_capability_class_set { net_admin net_raw };
20# allow wificond to speak to nl80211 in the kernel
21allow wificond self:netlink_socket create_socket_perms_no_ioctl;
22# newer kernels (e.g. 4.4 but not 4.1) have a new class for sockets
23allow wificond self:netlink_generic_socket create_socket_perms_no_ioctl;
24
25r_dir_file(wificond, proc_net_type)
26
27# allow wificond to check permission for dumping logs
28allow wificond permission_service:service_manager find;
29
30# dumpstate support
31allow wificond dumpstate:fd use;
32allow wificond dumpstate:fifo_file write;
33
34#### Offer the Wifi Keystore HwBinder service ###
35hwbinder_use(wificond)
36get_prop(wificond, hwservicemanager_prop)
37typeattribute wificond wifi_keystore_service_server;
38add_hwservice(wificond, system_wifi_keystore_hwservice)
39
40# Allow keystore binder access to serve the HwBinder service.
41allow wificond keystore_service:service_manager find;
42allow wificond keystore:keystore_key get;
43