blob: 6439106ff493d7cd5aa5e19fdcd6b7be22b66963 [file] [log] [blame]
Ameya Thakurb6947d62014-10-01 16:32:13 -07001#Policy file for qcom-system-daemon
2#qcomsysd = qcom-system-daemon domain
Biswajit Paul6786a922017-03-16 11:53:53 -07003type qcomsysd, domain;
Ravi Kumar Siddojigaric7def122017-06-13 00:49:19 +05304type qcomsysd_exec, exec_type, vendor_file_type, file_type;
Ameya Thakurb6947d62014-10-01 16:32:13 -07005init_daemon_domain(qcomsysd);
6
7#Needed for logging
Avijit Kanti Das441bad42015-05-12 14:07:41 -07008allow qcomsysd smem_log_device:chr_file rw_file_perms;
Ameya Thakurb6947d62014-10-01 16:32:13 -07009
10#Needed to read/write cookies to the misc partition
Avijit Kanti Das441bad42015-05-12 14:07:41 -070011allow qcomsysd block_device:dir r_dir_perms;
12allow qcomsysd {
Avijit Kanti Das441bad42015-05-12 14:07:41 -070013 #Needed to access the bootselect partition
14 bootselect_device
15}:blk_file rw_file_perms;
Ameya Thakurb6947d62014-10-01 16:32:13 -070016
17#Needed to get image info from socinfo
Avijit Kanti Das441bad42015-05-12 14:07:41 -070018r_dir_file(qcomsysd, sysfs_socinfo)
19allow qcomsysd sysfs_socinfo:file w_file_perms;
Rajshekar Eashwarappa39bed8c2014-11-19 15:57:26 +053020
Avijit Kanti Das441bad42015-05-12 14:07:41 -070021allow qcomsysd self:capability { dac_override sys_boot };
22use_per_mgr(qcomsysd);
muluhe11f90842016-09-06 18:08:28 +080023#allow qcomsysd access boot mode switch
Michael Bestasfc211fc2017-08-08 21:18:48 +030024set_prop(qcomsysd, boot_mode_prop)
Biswajit Paul277acbb2016-07-20 12:02:14 -070025
26#diag
27userdebug_or_eng(`
28 diag_use(qcomsysd)
Anuj Singhal75420162017-07-10 14:50:20 +053029 set_prop(qcomsysd, powerctl_prop)
Biswajit Paulf63bd142017-03-16 16:41:02 -070030 allow qcomsysd sysfs:file rw_file_perms;
Sunmeet Gill575d2492017-05-22 19:03:52 -070031 allow qcomsysd sysfs_data:file r_file_perms;
Biswajit Paul277acbb2016-07-20 12:02:14 -070032')