hal_wifi_supplicant_default.te 1.5 KB

1234567891011121314151617181920212223242526272829303132
  1. # wpa supplicant or equivalent
  2. type hal_wifi_supplicant_default, domain;
  3. hal_server_domain(hal_wifi_supplicant_default, hal_wifi_supplicant)
  4. type hal_wifi_supplicant_default_exec, exec_type, vendor_file_type, file_type;
  5. init_daemon_domain(hal_wifi_supplicant_default)
  6. net_domain(hal_wifi_supplicant_default)
  7. # Create a socket for receiving info from wpa
  8. type_transition hal_wifi_supplicant_default wifi_data_file:dir wpa_socket "sockets";
  9. # Allow wpa_supplicant to configure nl80211
  10. allow hal_wifi_supplicant_default proc_net_type:file write;
  11. # Allow wpa_supplicant to talk to Wifi Keystore HwBinder service.
  12. hwbinder_use(hal_wifi_supplicant_default)
  13. allow hal_wifi_supplicant_default system_wifi_keystore_hwservice:hwservice_manager find;
  14. binder_call(hal_wifi_supplicant_default, wifi_keystore_service_server)
  15. allow hal_wifi_supplicant_default wpa_data_file:dir create_dir_perms;
  16. allow hal_wifi_supplicant_default wpa_data_file:file create_file_perms;
  17. allow hal_wifi_supplicant_default wpa_data_file:sock_file create_file_perms;
  18. # Write to security logs for audit.
  19. get_prop(hal_wifi_supplicant_default, device_logging_prop)
  20. # Devices upgrading to P may grant this permission in device-specific
  21. # policy along with the data_between_core_and_vendor_violators
  22. # attribute needed for an exemption. However, devices that launch with
  23. # P should use /data/vendor/wifi, which is already granted in core
  24. # policy. This is dontaudited here to avoid conditional
  25. # device-specific behavior in wpa_supplicant.
  26. dontaudit hal_wifi_supplicant_default wifi_data_file:dir search;