[SSSD] [PATCH] IPA: explicitly link libsss_ipa with selinux library
Lukas Slebodnik
lslebodn at redhat.com
Wed Feb 12 20:37:22 UTC 2014
ehlo,
dlopen test failed when I was testing patches for krb5 CFLAGS with custom build
of MIT kerberos.
sh-4.2$ ./dlopen-tests
Running suite(s): dlopen
0%: Checks: 1, Failures: 1, Errors: 0
src/tests/dlopen-tests.c:129:F:dlopen:test_dlopen_base:0:
Error opening libsss_ipa.so: [dlopen() failed: ./sssd/.libs/libsss_ipa.so:
undefined symbol: selinux_policy_root].
Function selinux_policy_root is used in the module ipa_selinux.c
by macro selogin_path,
sh-4.2$ objdump -T /usr/lib64/sssd/libsss_ipa.so | grep selinux_policy_root
0000000000000000 D *UND* 0000000000000000 selinux_policy_root
But libsss_ipa.so was not linked with selinux library
It was not problem because another libraries depens on selinux.so
libsss_ipa.so -> libk5crypto.so -> libkrb5support.so -> libselinux.so
We should not rely on dependencies of other libraries.
Before patch:
sh-4.2$ objdump -p /usr/lib64/sssd/libsss_ipa.so | grep selinux
After patch:
sh-4.2$ objdump -p /usr/lib64/sssd/libsss_ipa.so | grep selinux
NEEDED libselinux.so.1
The simple patch is attached.
LS
-------------- next part --------------
>From 4585b4b6dea6066dfb841ae522087f5cafae7947 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Wed, 12 Feb 2014 21:17:20 +0100
Subject: [PATCH] IPA: explicitly link libsss_ipa with selinux library
Function selinux_policy_root is used in the module ipa_selinux.c
by macro selogin_path, but libsss_ipa.so was not linked with selinux library
It was not problem because another libraries depens on selinux.so
libsss_ipa.so -> libk5crypto.so -> libkrb5support.so -> libselinux.so
We should not rely on dependencies of other libraries.
---
Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile.am b/Makefile.am
index 9c155d68c7f452bb02a4da154992fa2fca6af273..8d9326865abf9d4390ecbce22b02597df0a8d613 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1794,6 +1794,7 @@ libsss_ipa_la_LIBADD = \
$(NDR_NBT_LIBS) \
$(KEYUTILS_LIBS) \
$(KRB5_LIBS) \
+ $(SELINUX_LIBS) \
libsss_ldap_common.la \
libsss_krb5_common.la \
libipa_hbac.la \
--
1.8.5.3
More information about the sssd-devel
mailing list