From d660d30e22d00c4899be82bbf6b1e3fc226df4e8 Mon Sep 17 00:00:00 2001 From: SamarV-121 Date: Sun, 12 Apr 2020 03:10:34 +0530 Subject: [PATCH] kunlun2: sepolicy: Allow power hal to access tap to wake node Signed-off-by: SamarV-121 --- sepolicy/private/file.te | 1 + sepolicy/private/file_contexts | 3 +++ sepolicy/private/hal_power.te | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 sepolicy/private/hal_power.te diff --git a/sepolicy/private/file.te b/sepolicy/private/file.te index d74de02..b70037d 100644 --- a/sepolicy/private/file.te +++ b/sepolicy/private/file.te @@ -2,3 +2,4 @@ type adsprpcd_file, file_type; type bt_firmware_file, file_type; type firmware_file, file_type; type persist_file, file_type; +type sysfs_tp, fs_type, sysfs_type; diff --git a/sepolicy/private/file_contexts b/sepolicy/private/file_contexts index 5347d1f..ed8dec7 100644 --- a/sepolicy/private/file_contexts +++ b/sepolicy/private/file_contexts @@ -1,3 +1,6 @@ +# DT2W +/sys/class/touch/tp_dev/gesture_on u:object_r:sysfs_tp:s0 + # Files in rootfs /bt_firmware(/.*)? u:object_r:bt_firmware_file:s0 /dsp(/.*)? u:object_r:adsprpcd_file:s0 diff --git a/sepolicy/private/hal_power.te b/sepolicy/private/hal_power.te new file mode 100644 index 0000000..f5a0040 --- /dev/null +++ b/sepolicy/private/hal_power.te @@ -0,0 +1,2 @@ +allow hal_power sysfs_tp:dir search; +allow hal_power sysfs_tp:file w_file_perms;