cil_write_ast: improve error handling
Improve the late failure on parsing the generated AST for
unsupported policy statements. Also, actually cause ALL
unsupported statements to cause a compile failure.
This error message:
flavor "CIL_TYPEBOUNDS" is not supported, look in file "external/selinux/libsepol/cil/src/cil_write_ast.c" on line 1251 to add support.
Problem at out/target/product/hikey/obj/ETC/nonplat_sepolicy.cil_intermediates/nonplat_policy_raw.cil:1301
cil_tree_walk failed, rc: -2
is better than:
Symbol not inside parenthesis at line 1248 of out/target/product/hikey/obj/ETC/nonplat_sepolicy.cil_intermediates/nonplat_policy_nvr.cil
Test: Add an unsuported typebounds statement in the policy and verify a failure.
Change-Id: Ic710a4e6e40b2df20e16f9a5bb14248831d381a3
Signed-off-by: William Roberts <william.c.roberts@intel.com>
1 file changed