1type wifi_diagnostic, domain; 2type wifi_diagnostic_exec, exec_type, vendor_file_type, file_type; 3 4# make transition from init to its domain 5userdebug_or_eng(` 6init_daemon_domain(wifi_diagnostic) 7net_domain(wifi_diagnostic) 8 9# daemon 10allow wifi_diagnostic wifi_logging_data_file:dir create_dir_perms; 11allow wifi_diagnostic wifi_logging_data_file:file create_file_perms; 12allow wifi_diagnostic vendor_shell_exec:file execute_no_trans; 13allow wifi_diagnostic wifi_diagnostic_exec:file execute_no_trans; 14allow wifi_diagnostic self:capability net_admin; 15allow wifi_diagnostic self:udp_socket ioctl; 16allowxperm wifi_diagnostic self:udp_socket ioctl { SIOCETHTOOL SIOCDEVPRIVATE }; 17 18# wpa_cli 19allow wifi_diagnostic self:capability { setgid setuid }; 20allow wifi_diagnostic wpa_data_file:dir w_dir_perms; 21allow wifi_diagnostic wpa_data_file:sock_file { create setattr write unlink }; 22allow wifi_diagnostic hal_wifi_supplicant_default:unix_dgram_socket sendto; 23allow wifi_diagnostic vendor_file:file execute_no_trans; 24allow wifi_diagnostic vendor_file:dir r_dir_perms; 25 26# property 27get_prop(wifi_diagnostic, vendor_wifi_diagnostic_prop) 28set_prop(wifi_diagnostic, vendor_wifi_diagnostic_prop) 29') 30