From e9799b355c9e444000c2d5a86c34587c50bf86b5 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sun, 22 Mar 2020 10:10:30 +0100 Subject: [PATCH] common: Give fingerprint HAL access to fp_sensor_device Change-Id: I74be51f532d8867bb084ceaccfa81b513ad5bbf6 --- common/vendor/device.te | 2 ++ common/vendor/file_contexts | 3 +++ common/vendor/hal_fingerprint_default.te | 4 ++++ 3 files changed, 9 insertions(+) create mode 100644 common/vendor/device.te create mode 100644 common/vendor/hal_fingerprint_default.te diff --git a/common/vendor/device.te b/common/vendor/device.te new file mode 100644 index 0000000..94329b8 --- /dev/null +++ b/common/vendor/device.te @@ -0,0 +1,2 @@ +# device.te +type fp_sensor_device, dev_type; diff --git a/common/vendor/file_contexts b/common/vendor/file_contexts index e87b80f..64d21dc 100644 --- a/common/vendor/file_contexts +++ b/common/vendor/file_contexts @@ -4,6 +4,9 @@ /data/vendor/conn(/.*)? u:object_r:conn_vendor_data_file:s0 /data/vendor/wifi(/.*)? u:object_r:wifi_vendor_data_file:s0 +### DEV +/dev/esfp[0-9] u:object_r:fp_sensor_device:s0 + ### VENDOR /(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@[0-9].[0-9]-service\.samsung u:object_r:hal_fingerprint_default_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.light@[0-9].[0-9]-service\.samsung u:object_r:hal_light_default_exec:s0 diff --git a/common/vendor/hal_fingerprint_default.te b/common/vendor/hal_fingerprint_default.te new file mode 100644 index 0000000..bfc464b --- /dev/null +++ b/common/vendor/hal_fingerprint_default.te @@ -0,0 +1,4 @@ +# hal_fingerprint_default.te + +# /dev/esfp[0-9] +allow hal_fingerprint_default fp_sensor_device:chr_file rw_file_perms; -- 2.20.1