Adding dirs to genfscon for sysfs to fix labeling issue.

This fixes the following denials:
denied { open } for pid=669 comm="init.power.sh"
path="/sys/class/devfreq" dev="sysfs" ino=28322
scontext=u:r:init_power:s0 tcontext=u:object_r:sysfs:s0 tclass=dir

denied { search } for pid=669 comm="init.power.sh" name="soc:qcom,cpubw"
dev="sysfs" ino=18242 scontext=u:r:init_power:s0
tcontext=u:object_r:sysfs_msm_subsys:s0 tclass=dir

denied { write } for pid=669 comm="init.power.sh" name="governor"
dev="sysfs" ino=44449 scontext=u:r:init_power:s0
tcontext=u:object_r:sysfs_msm_subsys:s0 tclass=file

denied { open } for pid=669 comm="init.power.sh"
path="/sys/devices/soc/soc:qcom,cpubw/devfreq/soc:qcom,cpubw/governor"
dev="sysfs" ino=44449 scontext=u:r:init_power:s0
tcontext=u:object_r:sysfs_msm_subsys:s0 tclass=file

Bug: 35154684
Test: The above denials are cleared out and the tcontext is correct
Change-Id: Ida40036c18427ab9a3116b7b855a8418f11137e7
This commit is contained in:
Max Bires
2017-04-03 09:33:38 -07:00
parent f41ff958d8
commit 73a599a65d
2 changed files with 5 additions and 0 deletions

View File

@@ -1,4 +1,7 @@
genfscon proc /debug/fwdump u:object_r:proc_wifi_dbg:s0
genfscon proc /debugdriver/driverdump u:object_r:proc_wifi_dbg:s0
genfscon sysfs /devices/soc/soc:qcom,cpubw u:object_r:sysfs_msm_subsys:s0
genfscon sysfs /devices/soc/soc:qcom,mincpubw u:object_r:sysfs_msm_subsys:s0
genfscon debugfs /kgsl/proc u:object_r:debugfs_kgsl:s0

View File

@@ -6,6 +6,8 @@ init_daemon_domain(init_power)
allow init_power shell_exec:file rx_file_perms;
allow init_power toolbox_exec:file rx_file_perms;
allow init_power sysfs_msm_subsys:dir r_dir_perms;
allow init_power sysfs_msm_subsys:file w_file_perms;
allow init_power sysfs_thermal:dir search;
allow init_power sysfs_thermal:file w_file_perms;
allow init_power sysfs_devices_system_cpu:file w_file_perms;