在构建AOSP S(12)时,我遇到了一个奇怪的问题,但可能只在有时/某些机器中。error.log如下所示
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然后我检查规则。system/sepolicy/private/property.te:46说:
enforce_sysprop_owner(`
neverallow domain {
property_type
-system_property_type
-product_property_type
-vendor_property_type
}:file no_rw_file_perms;
')系统/sepolicy/public/dumpstate.te:278说:
# Read any system properties
get_prop(dumpstate, property_type)我的问题是,这是否违反了“永不允许”规则并导致了这个错误?如果是,为什么有时这个错误不会弹出。如果没有,我错误的原因是什么?
提前谢谢。
发布于 2022-02-07 05:46:36
我在设备/小米/果汁/BroadConfig.mk下添加了下面的代码
# Sepolicy
SELINUX_IGNORE_NEVERALLOWS := true但是,在用户构建中不支持这一点。只支持在用户调试和英语版本。
发布于 2022-01-11 07:18:38
我知道原因了。原因是我有另一个使用property_type的文件,如果该文件存在,问题就会弹出;否则,一切都会顺利进行。希望这对你有用。顺便说一句,错误信息离真正的问题很远。
https://stackoverflow.com/questions/70662317
复制相似问题