Home | History | Annotate | Download | only in sepolicy
      1 # qcom-post-boot service
      2 type qcom-post-boot, domain;
      3 type qcom-post-boot_exec, exec_type, file_type;
      4 
      5 # Started by init
      6 init_daemon_domain(qcom-post-boot)
      7 
      8 # Set ctl.thermal-engine property.
      9 set_prop(qcom-post-boot, ctl_thermal-engine_prop);
     10 
     11 # Set ctl.mpdecision property.
     12 set_prop(qcom-post-boot, ctl_mpdecision_prop);
     13 
     14 # Allow access to /dev/ttyHS0.
     15 allow qcom-post-boot serial_device:chr_file { getattr setattr };
     16 
     17 allow qcom-post-boot shell_exec:file r_file_perms;
     18 
     19 # Write access to thermal related sysfs nodes.
     20 allow qcom-post-boot sysfs_thermal:dir search;
     21 allow qcom-post-boot sysfs_thermal:file w_file_perms;
     22 
     23 # Access to /sys/module/rpm_resources/*.
     24 allow qcom-post-boot sysfs_rpm_resources:dir search;
     25 allow qcom-post-boot sysfs_rpm_resources:file w_file_perms;
     26 
     27 # Write access to mpdecision related sysfs nodes.
     28 allow qcom-post-boot sysfs_mpdecision:dir search;
     29 allow qcom-post-boot sysfs_mpdecision:file { rw_file_perms setattr };
     30 
     31 # Access to /sys/module/msm_dcvs/*.
     32 allow qcom-post-boot sysfs_dcvs:dir search;
     33 allow qcom-post-boot sysfs_dcvs:file { rw_file_perms setattr };
     34 
     35 # Chown /sys/devices/platform/bt_power/*.
     36 allow qcom-post-boot sysfs_bt_power:dir search;
     37 allow qcom-post-boot sysfs_bt_power:file { getattr setattr };
     38 
     39 # Write access to /sys/devices/system/cpu/*.
     40 allow qcom-post-boot sysfs_devices_system_cpu:file { w_file_perms setattr };
     41 
     42 # Write access to dynamically generated files under /sys/devices/system/cpufreq/ondemand/*.
     43 allow qcom-post-boot sysfs:file { w_file_perms setattr };
     44 
     45 # Allow changing the owner of the above sysfs nodes.
     46 allow qcom-post-boot self:capability { fowner chown fsetid };
     47 
     48 allow qcom-post-boot sysfs:file r_file_perms;
     49 
     50 allow qcom-post-boot toolbox_exec:file rx_file_perms;
     51