• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
11# create sockets to set interfaces up and down
12allow wificond self:udp_socket create_socket_perms;
13# setting interface state up/down is a privileged ioctl
14allowxperm wificond self:udp_socket ioctl { SIOCSIFFLAGS SIOCSIFHWADDR };
15allow wificond self:global_capability_class_set { net_admin net_raw };
16# allow wificond to speak to nl80211 in the kernel
17allow wificond self:netlink_socket create_socket_perms_no_ioctl;
18# newer kernels (e.g. 4.4 but not 4.1) have a new class for sockets
19allow wificond self:netlink_generic_socket create_socket_perms_no_ioctl;
20
21r_dir_file(wificond, proc_net_type)
22
23# allow wificond to check permission for dumping logs
24allow wificond permission_service:service_manager find;
25
26# dumpstate support
27allow wificond dumpstate:fd use;
28allow wificond dumpstate:fifo_file write;
29
30#### Offer the Wifi Keystore HwBinder service ###
31hwbinder_use(wificond)
32typeattribute wificond wifi_keystore_service_server;
33add_hwservice(wificond, system_wifi_keystore_hwservice)
34
35# Allow keystore binder access to serve the HwBinder service.
36allow wificond keystore_service:service_manager find;
37allow wificond keystore:keystore_key get;
38
39# Allow keystore2 binder access to serve the HwBinder service.
40allow wificond wifi_key:keystore2_key {
41    get_info
42    use
43};
44