When building AOSP S(12), I encounter a strange problem, but maybe only in sometimes / some machine. The error.log is as follows
neverallow check failed at out/target/product/msmnile_au/obj/ETC/plat_sepolicy.cil_intermediates/plat_sepolicy.cil:22861 from system/sepolicy/private/property.te:46
(neverallow domain base_typeattr_745 (file (ioctl read write create setattr lock relabelfrom append unlink link rename open watch watch_mount watch_sb watch_with_perm watch_reads)))
<root>
allow at out/target/product/msmnile_au/obj/ETC/plat_sepolicy.cil_intermediates/plat_sepolicy.cil:8901
(allow dumpstate property_type (file (read getattr map open)))
<root>
allow at out/target/product/msmnile_au/obj/ETC/plat_sepolicy.cil_intermediates/plat_sepolicy.cil:11533
(allow init property_type (file (read write create getattr setattr relabelto append map unlink rename open)))
<root>
allow at out/target/product/msmnile_au/obj/ETC/plat_pub_versioned.cil_intermediates/plat_pub_versioned.cil:6370
(allow dumpstate_31_0 property_type (file (read getattr map open)))
<root>
allow at out/target/product/msmnile_au/obj/ETC/plat_pub_versioned.cil_intermediates/plat_pub_versioned.cil:8170
(allow init_31_0 property_type (file (read write create getattr setattr relabelto append map unlink rename open)))
Failed to generate binary
Failed to build policydb
Then I check the rules. system/sepolicy/private/property.te:46 says:
enforce_sysprop_owner(`
neverallow domain {
property_type
-system_property_type
-product_property_type
-vendor_property_type
}:file no_rw_file_perms;
')
and system/sepolicy/public/dumpstate.te:278 says:
# Read any system properties
get_prop(dumpstate, property_type)
My question is, does this violate the never allow rule and cause this error? If yes, why sometimes this error does not pop up. If not, what is the reason for my error?
Thanks in advance.