common: Fix neverallows of fastcharge rules
authorroynatech2544 <whiteshell2544@naver.com>
Sat, 11 Feb 2023 07:23:56 +0000 (16:23 +0900)
committerRoyna <whiteshell2544@naver.com>
Sat, 11 Feb 2023 08:09:24 +0000 (09:09 +0100)
- hal_lineage_fastcharge itself is a typeattribute, therefore it is considered a coredomain and neverallow doesn't pass.

neverallow check failed at
out/soong/.intermediates/system/sepolicy/plat_sepolicy.cil/android_common/plat_sepolicy.cil:23504
from system/sepolicy/private/property.te:324
(neverallow base_typeattr_741 base_typeattr_742 (property_service
(set)))                                         <root>
allow at
out/soong/.intermediates/system/sepolicy/vendor_sepolicy.cil/android_common/vendor_sepolicy.cil:1828
(allow hal_lineage_fastcharge vendor_fastcharge_prop (property_service
(set)))

- Correct the usage to hal_lineage_fastcharge_default, which is a domain type and _NOT_ a coredomain, neverallow passes

Test: m bacon, build works
Change-Id: I04ae2ff0db0de2a6deae2860951d6f7b40c7ae79
Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
common/vendor/hal_lineage_fastcharge_default.te

index a0281d5052c68f68d2f2c19e47360a699b51251a..cdea89c3eef51e44cdb4426252c5a7df399750f6 100644 (file)
@@ -1,6 +1,6 @@
 # hal_lineage_fastcharge_default
 
-set_prop(hal_lineage_fastcharge, vendor_fastcharge_prop)
+set_prop(hal_lineage_fastcharge_default, vendor_fastcharge_prop)
 
 allow hal_lineage_fastcharge_default sysfs_sec_switch:dir search;
 allow hal_lineage_fastcharge_default sysfs_sec_switch_writable:file rw_file_perms;