sm6375-common: sepolicy: Set stflashtool prop correctly

06-22 19:23:59.519   608   608 I auditd  : type=1400 audit(0.0:17): avc: denied { read } for comm="STFlashTool" name="u:object_r:nfc_prop:s0" dev="tmpfs" ino=11923 scontext=u:r:stflashtool:s0 tcontext=u:object_r:nfc_prop:s0 tclass=file permissive=0
06-22 19:23:59.599     1     1 I auditd  : type=1107 audit(0.0:18): uid=0 auid=4294967295 ses=4294967295 subj=u:r:init:s0 msg='avc: denied { set } for property=nfc.fw.dnld_force pid=608 uid=1027 gid=1027 scontext=u:r:stflashtool:s0 tcontext=u:object_r:nfc_prop:s0 tclass=property_service permissive=0'

Signed-off-by: chrisl7 <wandersonrodriguesf1@gmail.com>
This commit is contained in:
chrisl7
2023-08-22 23:17:13 +00:00
committed by boedhack99
parent ed5403c49b
commit af745fc21c
4 changed files with 8 additions and 3 deletions

View File

@@ -2,3 +2,5 @@
allow hal_nfc_default vendor_nfc_vendor_data_file:dir { search write };
allow hal_nfc_default vendor_nfc_vendor_data_file:dir create_dir_perms;
allow hal_nfc_default vendor_nfc_vendor_data_file:file create_file_perms;
set_prop(hal_nfc_default, vendor_nfc_prop)

View File

@@ -10,5 +10,8 @@ vendor_internal_prop(vendor_thermal_normal_prop)
# IMEI
vendor_internal_prop(vendor_deviceid_prop);
# NFC
vendor_internal_prop(vendor_nfc_prop)
# Serial number
vendor_internal_prop(vendor_sno_prop);

View File

@@ -29,7 +29,7 @@ persist.vendor.sys.pay. u:object_r:vendor_tee_listener_prop:s0
persist.vendor.sys.provision.status u:object_r:vendor_tee_listener_prop:s0
# NFC
ro.vendor.nfc.repair u:object_r:vendor_public_vendor_default_prop:s0
ro.vendor.nfc.repair u:object_r:vendor_nfc_prop:s0
# RIL
odm.ril.radio.status. u:object_r:vendor_radio_prop:s0

View File

@@ -4,7 +4,7 @@ type stflashtool_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(stflashtool)
allow stflashtool nfc_device:chr_file {ioctl read write getattr lock append map open watch watch_reads};
allow stflashtool vendor_nfc_nq_prop:file { read getattr open map };
get_prop(stflashtool, vendor_radio_prop)
set_prop(stflashtool, vendor_nfc_nq_prop)
get_prop(stflashtool, vendor_nfc_prop)
set_prop(stflashtool, vendor_nfc_prop)