History log of /external/selinux/libselinux/src/label_media.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e0456053d045997fa072565eb9b2c95ce9c9724a 15-Oct-2015 Richard Haines <richard_c_haines@btinternet.com> libselinux: Fix selabel_open(3) services if no digest requested

If selabel_open is called with no request for a digest it will fail
with ENOENT. This fixes all the labeling routines to resolve this
problem. The utils/selabel_digest example has also been updated
to allow calling selabel_open with and without digest requests to
aid testing.

Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
/external/selinux/libselinux/src/label_media.c
e40bbea95f555fe9708cbbc39895bd67a8ac6c48 30-Sep-2015 Richard Haines <richard_c_haines@btinternet.com> libselinux: Add selabel_digest function

selabel_digest(3) if enabled by the SELABEL_OPT_DIGEST option during
selabel_open(3) will return an SHA1 digest of the spec files, plus
a list of the specfiles used to calculate the digest. There is a
test utility supplied that will demonstrate the functionality.

The use case for selabel_digest(3) is to implement an selinux_restorecon
function based on the Android version that writes a hash of the
file_contexts files to an extended attribute to enhance performance
(see external/libselinux/src/android.c selinux_android_restorecon()).

Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
/external/selinux/libselinux/src/label_media.c
c2cb37580a201d1a68c3be1c096daeca26ba3599 15-Sep-2015 Richard Haines <richard_c_haines@btinternet.com> libselinux: Free memory when processing media and x specfiles

Ensure all memory is freed - checked using valgrind

Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
/external/selinux/libselinux/src/label_media.c
f2cd2f821fa34e8c7a12744626e19208463aa4e2 10-Jul-2015 Richard Haines <richard_c_haines@btinternet.com> libselinux: Add const to selinux_opt for label backends.

Change selabel_open and label backends to take a
'const struct selinux_opt' argument. This work has already
been done for the Android version components.

Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
/external/selinux/libselinux/src/label_media.c
417cb8d076a31c57710429b255aebc595613eb6b 13-Mar-2015 Petr Lautrbach <plautrba@redhat.com> Fix -Wformat errors

Fixes two types of errors which appear when building with gcc-5.0.0

- format ‘%d’ expects argument of type ‘int’, but argument X has type ‘unsigned int’
- format ‘%a’ expects argument of type ‘float *’, but argument X has type ‘char **’

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
/external/selinux/libselinux/src/label_media.c
16a37c9f94c1e2dfb865e17e4200d2824d4971f5 19-Dec-2011 Richard Haines <richard_c_haines@btinternet.com> libselinux - correct selabel invalid context logging

When selabel_lookup found an invalid context with validation enabled, it
always stated it was 'file_contexts' whether media, x, db or file.
The fix is to store the spec file name in the selabel_lookup_rec on
selabel_open and use this as output for logs. Also a minor fix if key is
NULL to stop seg faults.

Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
/external/selinux/libselinux/src/label_media.c
13cd4c8960688af11ad23b4c946149015c80d549 19-Aug-2008 Joshua Brindle <method@manicmethod.com> initial import from svn trunk revision 2950
/external/selinux/libselinux/src/label_media.c