Ameya Thakur | b6947d6 | 2014-10-01 16:32:13 -0700 | [diff] [blame] | 1 | #Policy file for qcom-system-daemon |
| 2 | #qcomsysd = qcom-system-daemon domain |
Biswajit Paul | 6786a92 | 2017-03-16 11:53:53 -0700 | [diff] [blame] | 3 | type qcomsysd, domain; |
Ravi Kumar Siddojigari | c7def12 | 2017-06-13 00:49:19 +0530 | [diff] [blame] | 4 | type qcomsysd_exec, exec_type, vendor_file_type, file_type; |
Ameya Thakur | b6947d6 | 2014-10-01 16:32:13 -0700 | [diff] [blame] | 5 | init_daemon_domain(qcomsysd); |
| 6 | |
| 7 | #Needed for logging |
Avijit Kanti Das | 441bad4 | 2015-05-12 14:07:41 -0700 | [diff] [blame] | 8 | allow qcomsysd smem_log_device:chr_file rw_file_perms; |
Ameya Thakur | b6947d6 | 2014-10-01 16:32:13 -0700 | [diff] [blame] | 9 | |
| 10 | #Needed to read/write cookies to the misc partition |
Avijit Kanti Das | 441bad4 | 2015-05-12 14:07:41 -0700 | [diff] [blame] | 11 | allow qcomsysd block_device:dir r_dir_perms; |
| 12 | allow qcomsysd { |
Avijit Kanti Das | 441bad4 | 2015-05-12 14:07:41 -0700 | [diff] [blame] | 13 | #Needed to access the bootselect partition |
| 14 | bootselect_device |
| 15 | }:blk_file rw_file_perms; |
Ameya Thakur | b6947d6 | 2014-10-01 16:32:13 -0700 | [diff] [blame] | 16 | |
| 17 | #Needed to get image info from socinfo |
Avijit Kanti Das | 441bad4 | 2015-05-12 14:07:41 -0700 | [diff] [blame] | 18 | r_dir_file(qcomsysd, sysfs_socinfo) |
| 19 | allow qcomsysd sysfs_socinfo:file w_file_perms; |
Rajshekar Eashwarappa | 39bed8c | 2014-11-19 15:57:26 +0530 | [diff] [blame] | 20 | |
Avijit Kanti Das | 441bad4 | 2015-05-12 14:07:41 -0700 | [diff] [blame] | 21 | allow qcomsysd self:capability { dac_override sys_boot }; |
| 22 | use_per_mgr(qcomsysd); |
muluhe | 11f9084 | 2016-09-06 18:08:28 +0800 | [diff] [blame] | 23 | #allow qcomsysd access boot mode switch |
Michael Bestas | fc211fc | 2017-08-08 21:18:48 +0300 | [diff] [blame] | 24 | set_prop(qcomsysd, boot_mode_prop) |
Biswajit Paul | 277acbb | 2016-07-20 12:02:14 -0700 | [diff] [blame] | 25 | |
| 26 | #diag |
| 27 | userdebug_or_eng(` |
| 28 | diag_use(qcomsysd) |
Anuj Singhal | 7542016 | 2017-07-10 14:50:20 +0530 | [diff] [blame] | 29 | set_prop(qcomsysd, powerctl_prop) |
Biswajit Paul | f63bd14 | 2017-03-16 16:41:02 -0700 | [diff] [blame] | 30 | allow qcomsysd sysfs:file rw_file_perms; |
Sunmeet Gill | 575d249 | 2017-05-22 19:03:52 -0700 | [diff] [blame] | 31 | allow qcomsysd sysfs_data:file r_file_perms; |
Biswajit Paul | 277acbb | 2016-07-20 12:02:14 -0700 | [diff] [blame] | 32 | ') |