blob: ed97a3fb90b3c0d68f46531c61e0bb7b9f930489 [file] [log] [blame]
Avijit Kanti Das441bad42015-05-12 14:07:41 -07001# Thermal-engine daemon
Biswajit Paul6786a922017-03-16 11:53:53 -07002type thermal-engine, domain;
Ravi Kumar Siddojigaric7def122017-06-13 00:49:19 +05303type thermal-engine_exec, exec_type, vendor_file_type, file_type;
Shiju Mathew30dea982014-04-11 11:51:53 -04004
5# Started by init
6init_daemon_domain(thermal-engine)
7
Avijit Kanti Das441bad42015-05-12 14:07:41 -07008# Allow to read and write cpufreq sysfs
9allow thermal-engine sysfs_devices_system_cpu:file rw_file_perms;
10
11# This is to access thermal query device and smem log device
12allow thermal-engine { thermal_device smem_log_device }:chr_file rw_file_perms;
13
14allow thermal-engine self:capability {
15 dac_read_search
16 dac_override
17 fsetid
18 sys_boot
19};
20
Biswajit Paulf63bd142017-03-16 16:41:02 -070021allow thermal-engine self:socket create_socket_perms;
22# ioctlcmd=c304
23allowxperm thermal-engine self:socket ioctl msm_sock_ipc_ioctls;
Avijit Kanti Das441bad42015-05-12 14:07:41 -070024
25# This is required to access thermal sockets
Shiju Mathew990d7462014-12-03 18:57:59 -050026allow thermal-engine thermal_socket:dir w_dir_perms;
Avijit Kanti Das441bad42015-05-12 14:07:41 -070027allow thermal-engine thermal_socket:sock_file create_file_perms;
Shiju Mathew990d7462014-12-03 18:57:59 -050028allow thermal-engine socket_device:dir w_dir_perms;
Avijit Kanti Das441bad42015-05-12 14:07:41 -070029
30# This is required for thermal sysfs access
31r_dir_file(thermal-engine, sysfs_thermal)
32allow thermal-engine { sysfs_thermal sysfs }:file w_file_perms;
33
34# This is required for qmi access
Biswajit Paul64f83f62014-10-13 14:36:16 -070035qmux_socket(thermal-engine);
Biswajit Paul977e5062014-10-14 20:34:55 -070036allow thermal-engine sysfs_mpdecision:file rw_file_perms;
Avijit Kanti Das441bad42015-05-12 14:07:41 -070037
Avijit Kanti Dasd01b3b32014-10-21 10:30:09 -070038r_dir_file(thermal-engine, sysfs_ssr);
Biswajit Paulf63bd142017-03-16 16:41:02 -070039r_dir_file(thermal-engine, sysfs)
40r_dir_file(thermal-engine, sysfs_leds)
Avijit Kanti Das441bad42015-05-12 14:07:41 -070041
42# This is required for wake alarm access
Shiju Mathew82e497f2015-01-20 14:18:16 -050043allow thermal-engine self:capability2 wake_alarm;
Avijit Kanti Das441bad42015-05-12 14:07:41 -070044
Biswajit Paul28439f92015-07-15 13:28:27 -070045#This is to allow access to uio device
46allow thermal-engine uio_device:chr_file rw_file_perms;
Biswajit Paul277acbb2016-07-20 12:02:14 -070047
48userdebug_or_eng(`
49 diag_use(thermal-engine)
50')
Ram Chandrasekar3b6ed5d2017-04-25 16:47:39 -060051
Manaf Meethalavalappu Pallikunhi0d884232017-07-17 23:40:20 +053052# To search, read and write kgsl sysfs
53allow thermal-engine sysfs_kgsl:dir r_dir_perms;
54allow thermal-engine sysfs_kgsl:file rw_file_perms;
55allow thermal-engine sysfs_kgsl:lnk_file r_file_perms;
56
Sunmeet Gill575d2492017-05-22 19:03:52 -070057allow thermal-engine sysfs_data:file r_file_perms;
Ram Chandrasekar3b6ed5d2017-04-25 16:47:39 -060058
59# netlink access
60allow thermal-engine self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
Manaf Meethalavalappu Pallikunhi0d884232017-07-17 23:40:20 +053061
62# This is required read and write battery power supply sysfs
63allow thermal-engine sysfs_battery_supply:dir r_dir_perms;
64allow thermal-engine sysfs_battery_supply:file rw_file_perms;
65allow thermal-engine sysfs_battery_supply:lnk_file r_file_perms;
66
67# This is required to read and write lcd-backlight sysfs
68allow thermal-engine sysfs_graphics:dir r_dir_perms;
69allow thermal-engine sysfs_graphics:file rw_file_perms;
70allow thermal-engine sysfs_graphics:lnk_file r_file_perms;
Rashed Abdel-Tawabb1ebb772018-01-26 16:39:23 -080071
72r_dir_file(thermal-engine, sysfs_uio)
73r_dir_file(thermal-engine, sysfs_uio_file)