1# Policy for sensor daemon 2type sensors, domain; 3type sensors_exec, exec_type, vendor_file_type, file_type; 4 5init_daemon_domain(sensors) 6 7allow sensors self:capability { 8 net_bind_service 9}; 10 11allow sensors self:socket create_socket_perms; 12allowxperm sensors self:socket ioctl msm_sock_ipc_ioctls; 13 14allow sensors persist_sensors_file:dir rw_dir_perms; 15allow sensors persist_sensors_file:file create_file_perms; 16allow sensors persist_file:dir { getattr search }; 17 18allow sensors sensors_vendor_data_file:dir create_dir_perms; 19allow sensors sensors_vendor_data_file:file create_file_perms; 20 21allow sensors system_file:dir r_dir_perms; 22allow sensors sensors_device:chr_file rw_file_perms; 23 24allow sensors sysfs_soc:dir r_dir_perms; 25allow sensors sysfs_soc:file r_file_perms; 26 27r_dir_file(sensors, sysfs_msm_subsys) 28 29userdebug_or_eng(` 30 r_dir_file(sensors, sysfs_diag) 31 allow sensors sysfs_timestamp_switch:file r_file_perms; 32 allow sensors diag_device:chr_file rw_file_perms; 33') 34dontaudit sensors diag_device:chr_file rw_file_perms; 35