From af3984886207e1edc4a616ac50775fd25e291ba3 Mon Sep 17 00:00:00 2001 From: Alexander Winkowski Date: Sun, 7 Jan 2024 11:40:48 +0000 Subject: [PATCH] sm8350-common: sepolicy: Simplify fingerprint rules Reuse existing AOSP fingerprint_vendor_data_file label Change-Id: I8632de158050edf87e1b04ec83f0c8c3a61ff0c0 --- sepolicy/vendor/file_contexts | 8 ++++---- sepolicy/vendor/hal_fingerprint_default.te | 5 ----- sepolicy/vendor/tee.te | 2 -- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts index 6b3e23b..b26892d 100644 --- a/sepolicy/vendor/file_contexts +++ b/sepolicy/vendor/file_contexts @@ -52,10 +52,10 @@ # Fingerprint /dev/goodix_fp u:object_r:vendor_fingerprint_device:s0 -/mnt/vendor/persist/goodix(/.*)? u:object_r:vendor_fingerprint_data_file:s0 -/data/vendor/fpc(/.*)? u:object_r:vendor_fingerprint_data_file:s0 -/data/vendor/fpdump(/.*)? u:object_r:vendor_fingerprint_data_file:s0 -/data/vendor/goodix(/.*)? u:object_r:vendor_fingerprint_data_file:s0 +/mnt/vendor/persist/goodix(/.*)? u:object_r:fingerprint_vendor_data_file:s0 +/data/vendor/fpc(/.*)? u:object_r:fingerprint_vendor_data_file:s0 +/data/vendor/fpdump(/.*)? u:object_r:fingerprint_vendor_data_file:s0 +/data/vendor/goodix(/.*)? u:object_r:fingerprint_vendor_data_file:s0 /vendor/bin/hw/android\.hardware\.biometrics\.fingerprint@2\.3-service\.xiaomi u:object_r:hal_fingerprint_default_exec:s0 /sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_hbm u:object_r:vendor_sysfs_udfps:s0 /sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_ui u:object_r:vendor_sysfs_udfps:s0 diff --git a/sepolicy/vendor/hal_fingerprint_default.te b/sepolicy/vendor/hal_fingerprint_default.te index 24bb566..6670be8 100644 --- a/sepolicy/vendor/hal_fingerprint_default.te +++ b/sepolicy/vendor/hal_fingerprint_default.te @@ -1,4 +1,3 @@ -type vendor_fingerprint_data_file, data_file_type, file_type; type vendor_fingerprint_device, dev_type; type vendor_hal_fingerprint_hwservice_xiaomi, hwservice_manager_type; type vendor_sysfs_udfps, sysfs_type, fs_type; @@ -34,7 +33,3 @@ allow hal_fingerprint_default uhid_device:chr_file rw_file_perms; allow hal_fingerprint_default vendor_fingerprint_device:chr_file rw_file_perms; allow hal_fingerprint_default input_device:dir r_dir_perms; allow hal_fingerprint_default input_device:chr_file rw_file_perms; - -# Data -allow hal_fingerprint_default vendor_fingerprint_data_file:dir rw_dir_perms; -allow hal_fingerprint_default vendor_fingerprint_data_file:file create_file_perms; diff --git a/sepolicy/vendor/tee.te b/sepolicy/vendor/tee.te index 5d1fbe1..fa2545e 100644 --- a/sepolicy/vendor/tee.te +++ b/sepolicy/vendor/tee.te @@ -1,3 +1 @@ -allow tee vendor_fingerprint_data_file:dir create_dir_perms; -allow tee vendor_fingerprint_data_file:file create_file_perms; allow tee vendor_bsg_device:chr_file { setattr };