selinux/libselinux
Stephen Smalley 3f99b14939 libselinux: fix overly strict validation of file_contexts.bin
load_mmap and regex_load_mmap (in the !USE_PCRE2 case) were
incorrectly treating the absence of any fixed stems or study data
as an error, rejecting valid file_contexts.bin files.  Remove
the extraneous validation checks.

Test:
$ cat > file_contexts <<EOF
(/.*)?                u:object_r:system_file:s0
/lib                   u:object_r:system_dir:s0
EOF
$ sefcontext_compile file_contexts
$ selabel_lookup -b file -k /lib -f file_contexts.bin

Before:
ERROR: selabel_open - Could not obtain handle.

After:
Default context: u:object_r:system_dir:s0

Reported-by: Jiyong Park <jiyong@google.com>
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2018-11-05 09:31:45 -05:00
..
include Fix minor typos 2018-06-30 20:28:25 +02:00
man Fix minor typos 2018-06-30 20:28:25 +02:00
src libselinux: fix overly strict validation of file_contexts.bin 2018-11-05 09:31:45 -05:00
utils libselinux: avcstat: fix build warning 2018-05-08 08:11:58 -04:00
LICENSE initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
Makefile libselinux: Add support for pcre2 to pkgconfig definition 2017-10-13 15:24:23 -04:00
VERSION Update VERSIONs to 2.8 for release. 2018-05-24 14:21:09 -04:00