From 946b7e5e36e64e79650327673dc5e55a1369c7f7 Mon Sep 17 00:00:00 2001 From: Super Liu Date: Fri, 23 Dec 2022 02:21:50 +0000 Subject: [PATCH] [DO NOT MERGE] Add sepolicy for procfs_touch_gti type Bug: 262796907 Test: TreeHugger build pass. Change-Id: I2b89aa6e0e9b8fbe42121f34e4c70639bdc225d2 --- whitechapel_pro/file.te | 2 ++ whitechapel_pro/genfs_contexts | 1 + whitechapel_pro/google_touch_app.te | 1 + whitechapel_pro/hal_dumpstate_default.te | 3 +++ 4 files changed, 7 insertions(+) diff --git a/whitechapel_pro/file.te b/whitechapel_pro/file.te index 8b79dbe4..90fe2fbf 100644 --- a/whitechapel_pro/file.te +++ b/whitechapel_pro/file.te @@ -112,8 +112,10 @@ type sysfs_usbc_throttling_stats, sysfs_type, fs_type; # Touch type proc_touch, proc_type, fs_type; +type proc_touch_gti, proc_type, fs_type; userdebug_or_eng(` typeattribute proc_touch mlstrustedobject; + typeattribute proc_touch_gti mlstrustedobject; ') # Vendor sched files diff --git a/whitechapel_pro/genfs_contexts b/whitechapel_pro/genfs_contexts index 5ee9a609..04bd9a9c 100644 --- a/whitechapel_pro/genfs_contexts +++ b/whitechapel_pro/genfs_contexts @@ -31,6 +31,7 @@ genfscon sysfs /devices/soc0/revision u genfscon sysfs /devices/platform/10d10000.spi/spi_master/spi0/spi0.0/synaptics_tcm.0/sysfs u:object_r:sysfs_touch:s0 genfscon sysfs /devices/virtual/sec/tsp u:object_r:sysfs_touch:s0 genfscon proc /focaltech_touch u:object_r:proc_touch:s0 +genfscon proc /goog_touch_interface u:object_r:proc_touch_gti:s0 # tracefs genfscon tracefs /events/dmabuf_heap/dma_heap_stat u:object_r:debugfs_tracing:s0 diff --git a/whitechapel_pro/google_touch_app.te b/whitechapel_pro/google_touch_app.te index f90fde1e..8428ff80 100644 --- a/whitechapel_pro/google_touch_app.te +++ b/whitechapel_pro/google_touch_app.te @@ -8,4 +8,5 @@ userdebug_or_eng(` allow google_touch_app sysfs_touch:dir r_dir_perms; allow google_touch_app sysfs_touch:file rw_file_perms; allow google_touch_app proc_touch:file rw_file_perms; + allow google_touch_app proc_touch_gti:file rw_file_perms; ') diff --git a/whitechapel_pro/hal_dumpstate_default.te b/whitechapel_pro/hal_dumpstate_default.te index fbfbd227..12fb8a7e 100644 --- a/whitechapel_pro/hal_dumpstate_default.te +++ b/whitechapel_pro/hal_dumpstate_default.te @@ -84,6 +84,9 @@ allow hal_dumpstate_default sysfs_touch:file rw_file_perms; allow hal_dumpstate_default proc_touch:dir r_dir_perms; allow hal_dumpstate_default proc_touch:file rw_file_perms; +allow hal_dumpstate_default proc_touch_gti:dir r_dir_perms; +allow hal_dumpstate_default proc_touch_gti:file rw_file_perms; + allow hal_dumpstate_default vendor_displaycolor_service:service_manager find; binder_call(hal_dumpstate_default, hal_graphics_composer_default); allow hal_dumpstate_default sysfs_display:dir r_dir_perms;