selinux/checkpolicy
Tri Vo ea8d689b53 Resolve conflicts in expandattribute.
This commit resolves conflicts in values of expandattribute statements
in policy language and expandtypeattribute in CIL.

For example, these statements resolve to false in policy language:
 expandattribute hal_audio true;
 expandattribute hal_audio false;

Similarly, in CIL these also resolve to false.
 (expandtypeattribute (hal_audio) true)
 (expandtypeattribute (hal_audio) false)

A warning will be issued on this conflict.

Motivation
When Android combines multiple .cil files from system.img and vendor.img
it's possible to have conflicting expandattribute statements.

This change deals with this scenario by resolving the value of the
corresponding expandtypeattribute to false. The rationale behind this
override is that true is used for reduce run-time lookups, while
false is used for tests which must pass.

Signed-off-by: Tri Vo <trong@android.com>
Acked-by: Jeff Vander Stoep <jeffv@google.com>
Acked-by: William Roberts <william.c.roberts@intel.com>
Acked-by: James Carter <jwcart2@tycho.nsa.gov>
2018-03-26 12:29:37 -07:00
..
test checkpolicy: build: follow standard semantics for DESTDIR and PREFIX 2018-02-14 15:59:37 +01:00
.gitignore Repo: update .gitignore 2011-08-02 13:31:51 -04:00
checkmodule.8 checkpolicy,libselinux,libsepol,policycoreutils: Update my email address 2017-08-17 14:17:12 -04:00
checkmodule.c checkpolicy: add noreturn attribute to usage() 2017-03-07 14:00:25 -05:00
checkpolicy.8 checkpolicy,libselinux,libsepol,policycoreutils: Update my email address 2017-08-17 14:17:12 -04:00
checkpolicy.c selinux: Add support for the SCTP portcon keyword 2018-03-19 12:34:29 -04:00
checkpolicy.h initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
COPYING initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
Makefile checkpolicy: build: follow standard semantics for DESTDIR and PREFIX 2018-02-14 15:59:37 +01:00
module_compiler.c checkpolicy: Make print_error_msg() static 2017-02-06 11:01:32 -05:00
module_compiler.h checkpolicy: Separate tunable from boolean during compile. 2011-09-16 11:54:01 -04:00
parse_util.c initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
parse_util.h initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
policy_define.c Resolve conflicts in expandattribute. 2018-03-26 12:29:37 -07:00
policy_define.h checkpolicy: Add support for ibendportcon labels 2017-05-23 16:20:55 -04:00
policy_parse.y checkpolicy,libselinux,libsepol,policycoreutils: Update my email address 2017-08-17 14:17:12 -04:00
policy_scan.l checkpolicy,libselinux,libsepol,policycoreutils: Update my email address 2017-08-17 14:17:12 -04:00
queue.c checkpolicy,libselinux,libsepol,policycoreutils: Update my email address 2017-08-17 14:17:12 -04:00
queue.h checkpolicy,libselinux,libsepol,policycoreutils: Update my email address 2017-08-17 14:17:12 -04:00
VERSION Update VERSION files for 2.7 release. 2017-08-04 09:31:00 -04:00