46320aefc22f04c5553d589d961b54ef41874d96 |
|
23-Nov-2015 |
Richard Haines <richard_c_haines@btinternet.com> |
libselinux: Correct line count for property and service contexts files When a line number is displayed for context errors they are x2 the correct value, so reset line count for each pass. Signed-off-by: Richard Haines <richard_c_haines@btinternet.com> Acked-by: Jeff Vander Stoep <jeffv@google.com>
/external/selinux/libselinux/src/label_android_property.c
|
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_android_property.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_android_property.c
|
a32da77251189b8ae4ecda40a5cf1f3b7daa4247 |
|
06-Aug-2015 |
Stephen Smalley <sds@tycho.nsa.gov> |
libselinux: fail hard on invalid property_contexts entries Fail hard on any error during property_contexts (or service_contexts) processing. We want to catch any such errors early and not proceed with a potentially mislabeled system. Also remove some obsoleted tests for NULL; they were necessary in earlier versions of the code where we were copying the strings at this point, but no longer. Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
/external/selinux/libselinux/src/label_android_property.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_android_property.c
|
9eae65894a9d647d9b2f031ce0a66c0a6a4b4a22 |
|
15-Jun-2015 |
Richard Haines <richard_c_haines@btinternet.com> |
libselinux: Fix property processing and cleanup formatting Fix memory issues flagged by valgrind. These changes bring the property service in line with Android [1] V2 reverts to original upstream %u when logging errors. Android needs these corrections also. [1] https://android-review.googlesource.com/#/c/153580/ Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
/external/selinux/libselinux/src/label_android_property.c
|
af41e2b5ff197f5e66262868fdc3a03963cd104e |
|
01-Jun-2015 |
Richard Haines <richard_c_haines@btinternet.com> |
libselinux: Add read_spec_entries function to replace sscanf Currently sscanf is used with %ms parameters that are not supported on all platforms. The new read_spec_entries function may be used to replace these where required. This patch updates sefcontext_compile, label_file and label_android_property services to use the new function. The file and property services have been tested on Android emulator and the file service on Fedora 21. Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
/external/selinux/libselinux/src/label_android_property.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_android_property.c
|
eb0ba200b513d05d176e10a85061fdf01d0426f7 |
|
24-Jan-2013 |
Robert Craig <rpcraig@tycho.ncsc.mil> |
libselinux: Adjustments to android property backend. Allow the android property backend parser to accept the SELABEL_OPT_VALIDATE option and to perform a validate callback. Extracted from the Android external/libselinux tree. Change-Id: If061502c5e2489a1155798fac1d8357dbb8d13ba Signed-off-by: Robert Craig <rpcraig@tycho.ncsc.mil>
/external/selinux/libselinux/src/label_android_property.c
|
1e8f102e8cec4ae84f09cc595013234398270366 |
|
06-Feb-2013 |
Eric Paris <eparis@redhat.com> |
libselinux: src/label_android_property: do not leak fd on error We were opening the path, but if the fstat failed or it was not a regular file we would return without closing the fd. Fix my using the common error exit path rather than just returning. Signed-off-by: Eric Paris <eparis@redhat.com>
/external/selinux/libselinux/src/label_android_property.c
|
aa62cd60f7192123b509c2518e7a2083e34a65a2 |
|
29-Nov-2012 |
Eric Paris <eparis@redhat.com> |
libselinux: Fix errors found by coverity Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Dan Walsh <dwalsh@redhat.com>
/external/selinux/libselinux/src/label_android_property.c
|
30900902b16c70fabe78a22aafb120443acdd53c |
|
31-May-2012 |
Eric Paris <eparis@redhat.com> |
libselinux: label_android_property whitespace cleanups Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Dan Walsh <dwalsh@redhat.com>
/external/selinux/libselinux/src/label_android_property.c
|
cfc492cf11e1b641e2a0478907d56a17b771a067 |
|
31-May-2012 |
rpcraig <rpcraig@tycho.ncsc.mil> |
libselinux: New Android property labeling backend This is already in the android repo. This is here to prevent potential conflicts of the selabel indices, and possibly with an eye toward an eventual reunification of the two libselinuxes down the road. Reviewed-by: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Dan Walsh <dwalsh@redhat.com>
/external/selinux/libselinux/src/label_android_property.c
|