rosemary: Allow Fingerprint HAL to write to relavent sysfs node

Signed-off-by: bengris32 <bengris32@protonmail.ch>
This commit is contained in:
bengris32
2022-09-25 15:13:46 +01:00
committed by Matsvei Niaverau
parent 7daa6b4197
commit 2c1d2a27cc
3 changed files with 6 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
# Fingerprint
type vendor_fingerprint_data_file, data_file_type, file_type;
type vendor_fingerprint_device, dev_type;
type sysfs_fingerprint, fs_type, sysfs_type;
# Health
type vendor_sysfs_ac_supply, fs_type, sysfs_type;

View File

@@ -1,3 +1,6 @@
# Fingerprint
genfscon sysfs /devices/platform/11012000.spi2/spi_master/spi2/spi2.0/authen_fd u:object_r:sysfs_fingerprint:s0
# Health
genfscon sysfs /devices/platform/mt_charger/power_supply/ac u:object_r:vendor_sysfs_ac_supply:s0
genfscon sysfs /devices/platform/mt_charger/power_supply/usb u:object_r:vendor_sysfs_usb_supply:s0

View File

@@ -1,5 +1,7 @@
# Allow fingerprint HAL to read and write fingerprint node
allow hal_fingerprint_default vendor_fingerprint_device:chr_file rw_file_perms;
allow hal_fingerprint_default sysfs_fingerprint:dir r_dir_perms;
allow hal_fingerprint_default sysfs_fingerprint:file rw_file_perms;
# Allow fingerprint HAL to setup fingerprint database files
allow hal_fingerprint_default vendor_fingerprint_data_file:dir rw_dir_perms;