From 89e473a368cb05ccde43b4399d493c4c99d5b05f Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Sun, 16 Jun 2019 16:05:23 +0200 Subject: [PATCH] msm8226-common: hal_lineage_livedisplay_default -> hal_lineage_livedisplay_sysfs Change-Id: If8954290c41913b7453a1cba4d67f7a63d08d2dd --- sepolicy/common/file_contexts | 2 +- sepolicy/common/hal_lineage_livedisplay_default.te | 7 ------- sepolicy/common/hal_lineage_livedisplay_sysfs.te | 12 ++++++++++++ 3 files changed, 13 insertions(+), 8 deletions(-) delete mode 100644 sepolicy/common/hal_lineage_livedisplay_default.te create mode 100644 sepolicy/common/hal_lineage_livedisplay_sysfs.te diff --git a/sepolicy/common/file_contexts b/sepolicy/common/file_contexts index 3ffac80..adb8c03 100644 --- a/sepolicy/common/file_contexts +++ b/sepolicy/common/file_contexts @@ -27,7 +27,7 @@ # executeables /(vendor|system/vendor)/bin/hw/android\.hardware\.sensors@1\.0-service.samsung8226 u:object_r:hal_sensors_default_exec:s0 -/(vendor|system/vendor)/bin/hw/vendor\.lineage\.livedisplay@2\.0-service\.samsung-qcom u:object_r:hal_lineage_livedisplay_default_exec:s0 +/(vendor|system/vendor)/bin/hw/vendor\.lineage\.livedisplay@2\.0-service\.samsung-qcom u:object_r:hal_lineage_livedisplay_sysfs_exec:s0 /(vendor|system/vendor)/bin/hw/vendor\.lineage\.touch@1\.0-service\.samsung u:object_r:hal_lineage_touch_default_exec:s0 # sockets diff --git a/sepolicy/common/hal_lineage_livedisplay_default.te b/sepolicy/common/hal_lineage_livedisplay_default.te deleted file mode 100644 index 6284c2f..0000000 --- a/sepolicy/common/hal_lineage_livedisplay_default.te +++ /dev/null @@ -1,7 +0,0 @@ -allow hal_lineage_livedisplay_default { - sysfs_graphics -}:dir search; - -allow hal_lineage_livedisplay_default { - sysfs_graphics -}:file rw_file_perms; diff --git a/sepolicy/common/hal_lineage_livedisplay_sysfs.te b/sepolicy/common/hal_lineage_livedisplay_sysfs.te new file mode 100644 index 0000000..10bebf0 --- /dev/null +++ b/sepolicy/common/hal_lineage_livedisplay_sysfs.te @@ -0,0 +1,12 @@ +# Allow LiveDisplay to store files under /data/vendor/display and access them +allow hal_lineage_livedisplay_sysfs display_vendor_data_file:dir rw_dir_perms; +allow hal_lineage_livedisplay_sysfs display_vendor_data_file:file create_file_perms; + +# Allow LiveDisplay to read and write to files in sysfs_graphics +allow hal_lineage_livedisplay_sysfs { + sysfs_graphics +}:dir search; + +allow hal_lineage_livedisplay_sysfs { + sysfs_graphics +}:file rw_file_perms;