diff options
author | Todd Poynor <toddpoynor@google.com> | 2017-08-24 00:00:04 -0700 |
---|---|---|
committer | Todd Poynor <toddpoynor@google.com> | 2017-09-20 18:03:03 +0000 |
commit | c447163a838ebfed1a34d8bd03ad37763667fbff (patch) | |
tree | 20f4e2a1fe17ff0df32d31356778f92b8e7614b0 | |
parent | 9f21003724125a4e4654fa76261f425c7be96886 (diff) | |
download | wahoo-c447163a838ebfed1a34d8bd03ad37763667fbff.tar.gz |
sepolicy: use context thermal_device for thermal driver device file
File /dev/msm_thermal_query is labeled with audio_device context,
which isn't accurate and triggers a neverallow rule when
thermal-engine is modified (in a future commit) to serve the
Thermal HAL. Use thermal_device context like other devices.
Bug: 30982366
Test: manual on walleye: logcat messages for device open OK
Change-Id: I62b995f90d034ddd4f80378d197d9206e2f96748
-rw-r--r-- | sepolicy/vendor/device.te | 1 | ||||
-rw-r--r-- | sepolicy/vendor/file_contexts | 1 | ||||
-rw-r--r-- | sepolicy/vendor/thermal-engine.te | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/sepolicy/vendor/device.te b/sepolicy/vendor/device.te index 97fc839b..c63bdb3b 100644 --- a/sepolicy/vendor/device.te +++ b/sepolicy/vendor/device.te @@ -23,5 +23,6 @@ type smd_device, dev_type; type spcom_device, dev_type; type ssd_block_device, dev_type; type ssr_device, dev_type; +type thermal_device, dev_type; type wlan_device, dev_type; type xbl_block_device, dev_type; diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts index d1c87af0..15419810 100644 --- a/sepolicy/vendor/file_contexts +++ b/sepolicy/vendor/file_contexts @@ -24,6 +24,7 @@ /dev/sdsprpc-smd u:object_r:dsp_device:s0 /dev/wcd-dsp-glink u:object_r:audio_device:s0 /dev/wcd_dsp0_control u:object_r:audio_device:s0 +/dev/msm_thermal_query u:object_r:thermal_device:s0 /dev/msm_.* u:object_r:audio_device:s0 /dev/avtimer u:object_r:avtimer_device:s0 /dev/subsys_.* u:object_r:ssr_device:s0 diff --git a/sepolicy/vendor/thermal-engine.te b/sepolicy/vendor/thermal-engine.te index 8720021e..d92b845f 100644 --- a/sepolicy/vendor/thermal-engine.te +++ b/sepolicy/vendor/thermal-engine.te @@ -17,7 +17,7 @@ allow thermal-engine sysfs_thermal:file rw_file_perms; allow thermal-engine sysfs_rmtfs:dir search; allow thermal-engine sysfs_rmtfs:file r_file_perms; -allow thermal-engine audio_device:chr_file rw_file_perms; +allow thermal-engine thermal_device:chr_file rw_file_perms; r_dir_file(thermal-engine, sysfs_leds) r_dir_file(thermal-engine, sysfs_msm_subsys) |