Commit Graph

7 Commits

Author SHA1 Message Date
Nicolas Iooss ae5de8ae69 libselinux: fix gcc -Wsign-compare warnings
Acked-by: Steve Lawrence <slawrence@tresys.com>
2014-10-02 09:56:11 -04:00
Dan Walsh 70b23853a8 libselinux: Compiled file context files and the original should have the same permissions
Currently the compiled file context files can end up with different
permissions then the original.  This can lead to non priv users
not being able to read the compiled versions.
2014-08-26 07:59:02 -04:00
Stephen Smalley ac33098a80 Add pcre version string to the compiled file_contexts format.
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-07-09 13:02:46 -04:00
Dan Walsh 874a976470 Fix handling of temporary file in sefcontext_compile.c
This way if something goes wrong regex file will not be corrupt.
2013-10-24 13:58:38 -04:00
Eric Paris ce39302fd0 libselinux: sefcontext_compile: do not leak fd on error
We open the file which is to be used to write the binary format of file
contexts.  If we hit an error actually writing things out, we return,
but never close the fd.  Do not leak.

Signed-off-by: Eric Paris <eparis@redhat.com>
2013-02-05 20:21:52 -05:00
rhatdan 44cba24ba6 libselinux: sefcontontext_compile: Add error handling to help debug problems in libsemanage.
Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
2013-02-01 12:08:57 -05:00
Eric Paris dac8b32c17 libselinux: utils: new file context regex compiler
This is a new 'compiler' which tranforms the file context database into
a binary format.  This binary format may be mmap'd in later removing the
need to compile the regular expression at run time.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
2013-02-01 12:08:56 -05:00