common: Give fingerprint HAL access to fp_sensor_device
authorAndreas Schneider <asn@cryptomilk.org>
Sun, 22 Mar 2020 09:10:30 +0000 (10:10 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 1 Apr 2020 05:43:22 +0000 (07:43 +0200)
Change-Id: I74be51f532d8867bb084ceaccfa81b513ad5bbf6

common/vendor/device.te [new file with mode: 0644]
common/vendor/file_contexts
common/vendor/hal_fingerprint_default.te [new file with mode: 0644]

diff --git a/common/vendor/device.te b/common/vendor/device.te
new file mode 100644 (file)
index 0000000..94329b8
--- /dev/null
@@ -0,0 +1,2 @@
+# device.te
+type fp_sensor_device, dev_type;
index e87b80f224f8cad4b238c0a0a01566846ee47377..64d21dcb7df1b900c631edf6b44c3654fff85642 100644 (file)
@@ -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 (file)
index 0000000..bfc464b
--- /dev/null
@@ -0,0 +1,4 @@
+# hal_fingerprint_default.te
+
+# /dev/esfp[0-9]
+allow hal_fingerprint_default fp_sensor_device:chr_file rw_file_perms;