diff options
author | Pádraig Brady <P@draigBrady.com> | 2013-11-27 18:21:48 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2013-11-27 20:59:23 +0000 |
commit | 7e39ef9f883ed788ce98329383ab071398e28b6d (patch) | |
tree | 60002a40cfe1c6868b2888596f9a53bc73c255fd /m4 | |
parent | 1e16de1de4a9172cf9a13a469cfc8a58738ec8fa (diff) | |
download | coreutils-7e39ef9f883ed788ce98329383ab071398e28b6d.tar.xz |
build: avoid more selinux build failures
Handle both newer selinux libraries with mode_to_security_class(),
and systems without selinux at all. We could easily adjust
gnulib to provide the necessary stubs for use by this module,
but it's more efficient to just stub out the module completely,
when not using selinux.
* src/selinux.h: Define stubs for the two module functions,
when SELinux is not available.
* src/selinux.c: Exclude all logic in preference for the stubs
when selinux isn't used. Also when newer selinux libs are used,
don't use our conflicting static version of mode_to_security_class().
m4/jm-macros.m4: Check for the system mode_to_security_class().
Diffstat (limited to 'm4')
-rw-r--r-- | m4/jm-macros.m4 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4 index 3f95def86..d7ccbab5c 100644 --- a/m4/jm-macros.m4 +++ b/m4/jm-macros.m4 @@ -44,9 +44,11 @@ AC_DEFUN([coreutils_MACROS], # used by shred AC_CHECK_FUNCS_ONCE([directio]) - # Used by install.c. coreutils_saved_libs=$LIBS LIBS="$LIBS $LIB_SELINUX" + # Used by selinux.c. + AC_CHECK_FUNCS([mode_to_security_class], [], []) + # Used by install.c. AC_CHECK_FUNCS([matchpathcon_init_prefix], [], [ case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in |