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