sm6375-common: sepolicy: Add mlipay rules

Change-Id: I1023e481d49ed5ec0ae15a513c65133987d6f556
This commit is contained in:
Erfan Abdi
2021-12-20 12:06:48 +03:30
committed by Ramii Ahmed
parent 0311ca16ef
commit ac20091f7d
7 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
attribute hal_mlipay;
attribute hal_mlipay_client;
attribute hal_mlipay_server;

View File

@@ -1,2 +1,5 @@
# Fingerprint
vendor_public_prop(vendor_fp_prop)
# Mlipay
vendor_public_prop(vendor_mlipay_prop)

1
sepolicy/vendor/app.te vendored Normal file
View File

@@ -0,0 +1 @@
get_prop({ appdomain -isolated_app }, vendor_mlipay_prop)

View File

@@ -31,6 +31,9 @@
# IR
/dev/ir_spi u:object_r:ir_spi_device:s0
# Mlipay
/vendor/bin/mlipayd@1.1 u:object_r:hal_mlipay_default_exec:s0
# NFC
/dev/pn553 u:object_r:nfc_device:s0
/dev/pn54x u:object_r:nfc_device:s0

22
sepolicy/vendor/hal_mlipay.te vendored Normal file
View File

@@ -0,0 +1,22 @@
type hal_mlipay_hwservice, hwservice_manager_type;
type hal_mlipay_default, domain;
hal_server_domain(hal_mlipay_default, hal_mlipay)
type hal_mlipay_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_mlipay_default)
# Allow hwbinder call from hal client to server
binder_call(hal_mlipay_client, hal_mlipay_server)
# Add hwservice related rules
add_hwservice(hal_mlipay_server, hal_mlipay_hwservice)
allow hal_mlipay_client hal_mlipay_hwservice:hwservice_manager find;
allow hal_mlipay_default tee_device:chr_file rw_file_perms;
allow hal_mlipay_default ion_device:chr_file r_file_perms;
r_dir_file(hal_mlipay_default, firmware_file)
set_prop(hal_mlipay_default, vendor_mlipay_prop);
get_prop(hal_mlipay_default, vendor_fp_prop)

View File

@@ -7,6 +7,9 @@ vendor.goodix.hardware.biometrics.fingerprint::IGoodixFingerprintDaemonExt u:obj
vendor.silead.hardware.fingerprintext::ISileadFingerprint u:object_r:hal_fingerprint_hwservice:s0
vendor.xiaomi.hardware.fingerprintextension::IXiaomiFingerprint u:object_r:hal_fingerprint_hwservice:s0
# Mlipay
vendor.xiaomi.hardware.mlipay::IMlipayService u:object_r:hal_mlipay_hwservice:s0
# NFC
vendor.nxp.nxpnfc::INxpNfc u:object_r:hal_nfc_hwservice:s0
vendor.nxp.nxpnfclegacy::INxpNfcLegacy u:object_r:hal_nfc_hwservice:s0

View File

@@ -9,6 +9,10 @@ ro.hardware.fp. u:object_r:vendor_fp_prop:s0
vendor.fps_hal. u:object_r:vendor_fp_prop:s0
vendor.silead.fp.ext. u:object_r:vendor_fp_prop:s0
# Mlipay
persist.vendor.sys.pay. u:object_r:vendor_mlipay_prop:s0
persist.vendor.sys.provision.status u:object_r:vendor_mlipay_prop:s0
# RIL
odm.ril.radio.status. u:object_r:vendor_radio_prop:s0
odm.ril.radio.status.sim1 u:object_r:vendor_radio_prop:s0