selinux/libselinux
Stephen Smalley a03f006d7e libselinux: setrans_client: minimize overhead when mcstransd is not present.
As mcstransd is not installed/running by default, we should not impose
the overhead of trying to connect to it on each operation that takes or
returns a security context string.  Test for the existence of the socket
file on first use, and if the socket file does not exist, then skip the
processing on all subsequent calls.

Previously we had a similar attempt at optimization by checking
whether MLS was enabled, but since the kernel MLS support is enabled
even for -mcs and mcstransd is no longer installed/running by default,
this is not a useful optimization.  Just replace it with the new test.

Compare strace ls -Z /usr/bin |& grep .setrans-unix before and after
this patch to get a sense of the impact.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-05-20 16:19:20 -04:00
..
include
man libselinux: matchpathcon/selabel_file: Fix man pages. 2015-05-11 09:53:37 -04:00
src libselinux: setrans_client: minimize overhead when mcstransd is not present. 2015-05-20 16:19:20 -04:00
utils libselinux: Ensure selabel_lookup_best_match links NULL terminated 2015-05-18 11:53:25 -04:00
ChangeLog Update libselinux ChangeLog. 2015-05-18 11:54:07 -04:00
LICENSE
Makefile
VERSION