platform_external_selinux/libsepol
James Carter 2d49a4b41c libsepol/cil: Create new keep field for type attribute sets
Daniel Cashman <dcashman@android.com> discovered the following:
When using cil_db multiple_decls, the different cil_attribute nodes
all point to the same underlying cil_attribute struct.  This leads
to problems, though, when modifying the used value in the struct.
__cil_post_db_attr() changes the value of the field to based on
the output of cil_typeattribute_used(), for use later in
cil_typeattribute_to_policydb and cil_typeattribute_to_bitmap, but
due to the multiple declarations, cil_typeattribute_used() could be
called again by a second node.  In this second call, the value used
is the modifed value of CIL_TRUE or CIL_FALSE, not the flags actually
needed. This could result in the field being reset again, to an
incorrect CIL_FALSE value.

Add the field "keep" to struct cil_typeattributeset, set its value
using cil_typeattribute_used(), and use it when determining whether
the attribute is to be kept or if it should be expanded.

Signed-off-by: James Carter <jwcart2@tycho.nsa.gov>
2017-11-22 11:49:19 -05:00
..
cil libsepol/cil: Create new keep field for type attribute sets 2017-11-22 11:49:19 -05:00
include checkpolicy,libselinux,libsepol,policycoreutils: Update my email address 2017-08-17 14:17:12 -04:00
man checkpolicy,libselinux,libsepol,policycoreutils: Update my email address 2017-08-17 14:17:12 -04:00
src libsepol: free ibendport device names 2017-10-25 16:07:37 -04:00
tests libsepol/tests: override CPPFLAGS too 2017-06-30 08:56:43 -04:00
utils Makefiles: override *FLAGS and *LIBS 2017-06-20 12:15:04 -04:00
.gitignore libsepol: build cil into libsepol 2014-08-26 08:03:31 -04: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 VERSION files for 2.7 release. 2017-08-04 09:31:00 -04:00