summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsamou <samou@google.com>2022-02-22 06:53:29 +0000
committersamou <samou@google.com>2022-03-31 08:32:23 +0000
commit33cf949be0897e3bf3c2040e06b9a4e30331d410 (patch)
treefa2713cf4ded3a34d439f63ab43250cd4eff91c4
parent112c9b01e3111aa581f495e670a01fe2288edd82 (diff)
downloadpixel-sepolicy-33cf949be0897e3bf3c2040e06b9a4e30331d410.tar.gz
Move ODPM file rule to pixel sepolicy
Bug: 213257759 Change-Id: I044a285ffef2b05c05df08676c86b65edb228078
-rw-r--r--common/vendor/file.te3
-rw-r--r--powerstats/hal_power_stats_default.te2
-rw-r--r--thermal/hal_thermal_default.te1
3 files changed, 6 insertions, 0 deletions
diff --git a/common/vendor/file.te b/common/vendor/file.te
index 8fb41bc..731c205 100644
--- a/common/vendor/file.te
+++ b/common/vendor/file.te
@@ -1,2 +1,5 @@
type persist_file, file_type, vendor_persist_type;
type sysfs_iio_devices, fs_type, sysfs_type;
+
+# ODPM
+type sysfs_odpm, sysfs_type, fs_type; \ No newline at end of file
diff --git a/powerstats/hal_power_stats_default.te b/powerstats/hal_power_stats_default.te
index b125ef7..a3ee625 100644
--- a/powerstats/hal_power_stats_default.te
+++ b/powerstats/hal_power_stats_default.te
@@ -6,3 +6,5 @@ add_service(hal_power_stats_server, hal_power_stats_service)
r_dir_file(hal_power_stats_default, sysfs_power_stats)
allow hal_power_stats_default power_stats_device:chr_file rw_file_perms;
+allow hal_power_stats_default sysfs_odpm:dir search;
+allow hal_power_stats_default sysfs_odpm:file rw_file_perms; \ No newline at end of file
diff --git a/thermal/hal_thermal_default.te b/thermal/hal_thermal_default.te
index 2498b20..1510b74 100644
--- a/thermal/hal_thermal_default.te
+++ b/thermal/hal_thermal_default.te
@@ -5,6 +5,7 @@ allow hal_thermal_default thermal_link_device:dir r_dir_perms;
allow hal_thermal_default proc_stat:file r_file_perms;
allow hal_thermal_default self:netlink_generic_socket create_socket_perms_no_ioctl;
allow hal_thermal_default self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
+allow hal_thermal_default sysfs_odpm:file r_file_perms;
hal_client_domain(hal_thermal_default, hal_power);