1 # Thermal-engine daemon 2 type thermal-engine, domain; 3 type thermal-engine_exec, exec_type, file_type; 4 5 init_daemon_domain(thermal-engine) 6 7 userdebug_or_eng(` 8 allow thermal-engine diag_device:chr_file rw_file_perms; 9 ') 10 11 allow thermal-engine self:capability { net_admin fsetid }; 12 13 allow thermal-engine self:netlink_kobject_uevent_socket create_socket_perms; 14 15 # Allow access to /dev/smem_log. 16 allow thermal-engine smem_log_device:chr_file rw_file_perms; 17 18 # Access to /dev/socket/thermal-.* 19 allow thermal-engine thermal_socket:sock_file rw_file_perms; 20 21 # Access to /dev/socket/mpdecision. 22 unix_socket_connect(thermal-engine, mpdecision, mpdecision); 23 24 # Allow access to /dev/uio0. 25 #allow rmt_storage uio_device:chr_file rw_file_perms; 26 27 # Write access to thermal related sysfs nodes. 28 r_dir_file(thermal-engine, sysfs_thermal) 29 allow thermal-engine sysfs_thermal:file w_file_perms; 30 31 # Creates/Talks to qmuxd via the qmux_radio socket. 32 qmux_socket(thermal-engine); 33 34 allow thermal-engine self:socket create_socket_perms; 35 36 allow thermal-engine sysfs_thermal:file r_file_perms; 37 38 allow thermal-engine sysfs_thermal:dir r_dir_perms; 39