debugpolicy: allow read access to the DPM version file
Allow init_dpm.sh to read the DPM version file at
sys/firmware/devicetree/base/dpm/version
Bug: 234479585
Change-Id: I3c1d11db1635ff7975aaab70c692a32881b3e483
Signed-off-by: Bryan Bong Gyoune Kim <bgkim@google.com>
diff --git a/debugpolicy/file.te b/debugpolicy/file.te
index 604ba50..e2ef397 100644
--- a/debugpolicy/file.te
+++ b/debugpolicy/file.te
@@ -1,2 +1,2 @@
# sysfs
-type sysfs_dpm_variant, sysfs_type, fs_type; # dpm variant
+type sysfs_dpm, sysfs_type, fs_type; # dpm
diff --git a/debugpolicy/genfs_contexts b/debugpolicy/genfs_contexts
index d30809d..b36e9f1 100644
--- a/debugpolicy/genfs_contexts
+++ b/debugpolicy/genfs_contexts
@@ -1 +1,2 @@
-genfscon sysfs /firmware/devicetree/base/dpm/variant u:object_r:sysfs_dpm_variant:s0
+genfscon sysfs /firmware/devicetree/base/dpm/variant u:object_r:sysfs_dpm:s0
+genfscon sysfs /firmware/devicetree/base/dpm/version u:object_r:sysfs_dpm:s0
diff --git a/debugpolicy/init_dpm.te b/debugpolicy/init_dpm.te
index b91c561..3a4f936 100644
--- a/debugpolicy/init_dpm.te
+++ b/debugpolicy/init_dpm.te
@@ -5,7 +5,7 @@
userdebug_or_eng(`
allow init_dpm vendor_toolbox_exec:file execute_no_trans;
-allow init_dpm sysfs_dpm_variant:file r_file_perms;
+allow init_dpm sysfs_dpm:file r_file_perms;
allow init_dpm block_device:dir search;
allow init_dpm dpm_block_device:blk_file rw_file_perms;
')