From b7f7fa2a3fd4c189effd6cb6078bd7c9b4db79a0 Mon Sep 17 00:00:00 2001 From: Danny Baumann Date: Mon, 10 Dec 2018 14:12:28 +0100 Subject: [PATCH] sdm845-common: Properly label display control files Additionally, allow system_server access to them. Change-Id: I12ceb3970460282d10b240e8a12207e2fd3ca882 --- sepolicy/private/file.te | 1 + sepolicy/private/genfs_contexts | 2 ++ sepolicy/private/system_server.te | 2 ++ 3 files changed, 5 insertions(+) create mode 100644 sepolicy/private/system_server.te diff --git a/sepolicy/private/file.te b/sepolicy/private/file.te index e22c12e..5a9a4fb 100644 --- a/sepolicy/private/file.te +++ b/sepolicy/private/file.te @@ -5,6 +5,7 @@ type op1_file, file_type; type op2_file, file_type; type persist_file, file_type; type proc_touchpanel, fs_type; +type sysfs_livedisplay, sysfs_type, fs_type; type sysfs_fpc_proximity, sysfs_type, fs_type; type sysfs_oem, sysfs_type, fs_type; type sysfs_battery_supply, sysfs_type, fs_type; diff --git a/sepolicy/private/genfs_contexts b/sepolicy/private/genfs_contexts index 952ba55..f96e494 100644 --- a/sepolicy/private/genfs_contexts +++ b/sepolicy/private/genfs_contexts @@ -1,2 +1,4 @@ genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pmi8998@2:qcom,qpnp-smb2/power_supply/dc u:object_r:sysfs_battery_supply:s0 genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pmi8998@2:qcom,qpnp-smb2/power_supply/main u:object_r:sysfs_battery_supply:s0 +genfscon sysfs /devices/platform/soc/soc:qcom,dsi-display@18/hbm u:object_r:sysfs_livedisplay:s0 +genfscon sysfs /devices/platform/soc/soc:qcom,dsi-display@18/display_mode u:object_r:sysfs_livedisplay:s0 diff --git a/sepolicy/private/system_server.te b/sepolicy/private/system_server.te new file mode 100644 index 0000000..b0c8a62 --- /dev/null +++ b/sepolicy/private/system_server.te @@ -0,0 +1,2 @@ +# Allow access to LiveDisplay tuning nodes +allow system_server sysfs_livedisplay:file rw_file_perms;