common: Allow fingerprint hal to create /data/vendor/biometrics
authorAndreas Schneider <asn@cryptomilk.org>
Sun, 22 Mar 2020 10:01:28 +0000 (11:01 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 1 Apr 2020 05:43:22 +0000 (07:43 +0200)
Change-Id: Ie0ce0aa067ee09ab30066384c3a831d6dc349d1f

common/vendor/file.te
common/vendor/file_contexts
common/vendor/hal_fingerprint_default.te

index 8983ac04a968c55e80114a1c20b020e71326399a..6387222753488fc59c7b84ad152f71850f7d8b37 100644 (file)
@@ -1,6 +1,7 @@
 # file.te
 
 ### DATA
+type biometrics_vendor_data_file, file_type, data_file_type;
 type conn_vendor_data_file, file_type, data_file_type;
 type wifi_vendor_data_file, file_type, data_file_type;
 
index 64d21dcb7df1b900c631edf6b44c3654fff85642..0f4d62a0de44893f56b9398b74eecf82ff9b7e0c 100644 (file)
@@ -1,6 +1,7 @@
 # file_contexts
 
 ### DATA
+/data/vendor/biometrics(/.*)?                u:object_r:biometrics_vendor_data_file:s0
 /data/vendor/conn(/.*)?                      u:object_r:conn_vendor_data_file:s0
 /data/vendor/wifi(/.*)?                      u:object_r:wifi_vendor_data_file:s0
 
index bfc464b10f424da9456bf6f146654a9922a6773d..db463db4ae7fb7c95c531b5fe9d18c191faa2bf2 100644 (file)
@@ -2,3 +2,9 @@
 
 # /dev/esfp[0-9]
 allow hal_fingerprint_default fp_sensor_device:chr_file rw_file_perms;
+
+# /data/vendor/ -> biometrics
+file_type_auto_trans(hal_fingerprint_default, vendor_data_file, biometrics_vendor_data_file)
+
+# /data/vendor/biometrics/*
+allow hal_fingerprint_default biometrics_vendor_data_file:file create_file_perms;