platform_external_selinux/libselinux/utils
Stephen Smalley aab9d90b35 libselinux: Correctly handle an empty file_contexts file.
If you add some local file contexts via semanage fcontext -a and
later delete them all via semanage fcontext -D, you get an empty
file_contexts.local file.  Then when you try to load it, getline()
returns 0 and we fall through to the out path without having set rc.
In label_file.c, rc will always be non-zero at this point because
we will have failed the load_mmap() call.  In sefcontext_compile,
rc may contain random garbage at this point.  Explicitly set rc
before the loop.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-06-22 09:11:33 -04:00
..
.gitignore libselinux: utils: new file context regex compiler 2013-02-01 12:08:56 -05:00
avcstat.c libselinux: Fix errors found by coverity 2013-02-05 20:14:45 -05:00
compute_av.c initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
compute_create.c initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
compute_member.c initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
compute_relabel.c initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
compute_user.c initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
getconlist.c Get rid of security_context_t and fix const declarations. 2014-02-19 16:11:48 -05:00
getdefaultcon.c Get rid of security_context_t and fix const declarations. 2014-02-19 16:11:48 -05:00
getenforce.c libselinux: use -W and -Werror in utils 2011-12-05 16:14:17 -05:00
getfilecon.c initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
getpidcon.c initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
getsebool.c libselinux: getsebool: support boolean name substitution 2012-09-12 13:14:29 -04:00
getseuser.c Get rid of security_context_t and fix const declarations. 2014-02-19 16:11:48 -05:00
Makefile libselinux: build sefcontext_compile with static libselinux 2015-06-15 15:25:42 -04:00
matchpathcon.c Get rid of security_context_t and fix const declarations. 2014-02-19 16:11:48 -05:00
policyvers.c initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
sefcontext_compile.c libselinux: Correctly handle an empty file_contexts file. 2015-06-22 09:11:33 -04:00
selabel_lookup.c libselinux: Add selabel partial and best match APIs 2015-05-06 11:58:44 -04:00
selabel_lookup_best_match.c libselinux: Ensure selabel_lookup_best_match links NULL terminated 2015-05-18 11:53:25 -04:00
selabel_partial_match.c libselinux: Add selabel partial and best match APIs 2015-05-06 11:58:44 -04:00
selinux_check_securetty_context.c libselinux: Fix const-ness of parameters & make usage() methods static 2012-03-28 14:52:12 -04:00
selinuxenabled.c initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
selinuxexeccon.c Deprecate use of flask.h and av_permissions.h. 2014-07-09 13:49:18 -04:00
setenforce.c libselinux: Fix const-ness of parameters & make usage() methods static 2012-03-28 14:52:12 -04:00
setfilecon.c initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
togglesebool.c Fix -Wformat errors 2015-03-13 14:14:23 -04:00