platform_external_selinux/libsepol
Thiébaud Weksteen 3342f74ef8 Fix build and use new cil_write_build_ast
Previously, Android used its own cil_write_ast function to output the
resulting AST. libsepol now defines a similar function named
cil_write_build_ast. The new function differs slightly in behaviour:

* It will output "source information" nodes in the resulting CIL. When
  loading, it is expected that each source information line (e.g.,
  `;;* lms 100 file.cil`) will be matched with a terminating entry (e.g.,
  `;;* lme`). If not, the loading will fail. Because we split and merge
  policy files in AOSP, explicitly ignore these lines when writing the
  AST.

* genfscon paths are now quoted following 644c5bb.

* An extra superfluous set of parentheses was previously added for some
  operators (e.g., "range" "and" or "not").

For typeattributes, cil_write_build_ast uses the `fqn` field and not
`name`. Ensure the nodes are correctly populated.

Bug: 190808996
Test: Build aosp_bramble-userdebug and manually compare the generated
    /{system,vendor,product}/etc/selinux* files with their previous
    versions. The differences are due to the new behaviours described
    above.
Test: Force a recompilation of the policy on device, the new policy is
    correctly loaded.
Change-Id: I088d1e94ca07cfbd0b6c604f1f82464b3537c392
2021-09-16 16:52:44 +02:00
..
cil Fix build and use new cil_write_build_ast 2021-09-16 16:52:44 +02:00
fuzz libsepol/cil: move the fuzz target and build script to the selinux repository 2021-08-17 10:33:47 -04:00
include Merge remote-tracking branch 'aosp/upstream-master' into update_3_3 2021-09-09 15:05:30 +02:00
man selinux: Update manpages after removing legacy boolean and user code 2019-07-29 23:46:47 +02:00
src Merge remote-tracking branch 'aosp/upstream-master' into update_3_3 2021-09-09 15:05:30 +02:00
tests libsepol: silence -Wextra-semi-stmt warning 2021-07-06 11:08:11 -04:00
utils libsepol: build: follow standard semantics for DESTDIR and PREFIX 2018-02-14 15:59:36 +01:00
.gitignore libsepol: build cil into libsepol 2014-08-26 08:03:31 -04:00
Android.bp Fix build and use new cil_write_build_ast 2021-09-16 16:52:44 +02:00
COPYING initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
Makefile libsepol: build cil into libsepol 2014-08-26 08:03:31 -04:00
VERSION Update VERSIONs and Python bindings version to 3.3-rc1 for release 2021-09-08 09:49:46 +02:00