Resolves: rhbz#1431153 - sssd: libsss_proxy.so needs to be linked with -ldl

This commit is contained in:
Lukas Slebodnik 2018-02-06 13:11:52 +01:00
parent e242e8ef93
commit f55e235d75
2 changed files with 189 additions and 1 deletions

View File

@ -0,0 +1,184 @@
From 7ad9f9c7c8b40e74647de455e454894a257bc0de Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn@redhat.com>
Date: Tue, 23 Jan 2018 11:48:10 +0100
Subject: [PATCH] BUILD: Add missing libs found by -Wl,-z,defs
It is not possible to fully build sssd with -Wl,-z,defs
because we are using sssd_be as a "library" in some cases
e.g.
src/providers/krb5/.libs/libsss_krb5_common_la-krb5_init_shared.o: In function `krb5_child_init':
src/providers/krb5/krb5_init_shared.c:38: undefined reference to `_dp_opt_get_bool'
src/providers/krb5/krb5_init_shared.c:47: undefined reference to `_dp_opt_get_string'
src/providers/krb5/krb5_init_shared.c:94: undefined reference to `_dp_opt_get_cstring'
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
---
Makefile.am | 52 +++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 47 insertions(+), 5 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index ab45633d2fea528ac36fa8141668824cf8f9a9b5..4a0c5afb6c2559ddd1385a4c85693f9d9997a728 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1883,6 +1883,7 @@ libsss_test_common_la_LIBADD = \
$(TALLOC_LIBS) \
$(TEVENT_LIBS) \
$(LDB_LIBS) \
+ $(SSSD_INTERNAL_LTLIBS) \
$(NULL)
if HAVE_CHECK
@@ -1908,10 +1909,12 @@ libdlopen_test_providers_la_CFLAGS = \
$(CHECK_CFLAGS) \
-DUNIT_TESTING
libdlopen_test_providers_la_LIBADD = \
+ $(LIBADD_DL) \
$(PAM_LIBS) \
$(SSSD_LIBS) \
$(CARES_LIBS) \
- $(SSSD_INTERNAL_LTLIBS)
+ $(SSSD_INTERNAL_LTLIBS) \
+ $(NULL)
if BUILD_SYSTEMTAP
libdlopen_test_providers_la_LIBADD += stap_generated_probes.lo
endif
@@ -1934,7 +1937,9 @@ dist_noinst_DATA += src/sss_client/idmap/sss_nss_idmap.unit_tests
libsss_ad_tests_la_SOURCES = $(libsss_ad_la_SOURCES)
libsss_ad_tests_la_CFLAGS = $(libsss_ad_la_CFLAGS)
-libsss_ad_tests_la_LIBADD = $(libsss_ad_la_LIBADD)
+libsss_ad_tests_la_LIBADD = \
+ $(libsss_ad_la_LIBADD) \
+ $(NULL)
libsss_ad_tests_la_LDFLAGS = \
-shared \
-rpath $(abs_top_builddir) \
@@ -3802,11 +3807,16 @@ libsss_ldap_common_la_CFLAGS = \
$(KRB5_CFLAGS) \
$(NULL)
libsss_ldap_common_la_LIBADD = \
+ $(TALLOC_LIBS) \
+ $(TEVENT_LIBS) \
+ $(LDB_LIBS) \
$(OPENLDAP_LIBS) \
+ $(DHASH_LIBS) \
$(KRB5_LIBS) \
libsss_krb5_common.la \
libsss_idmap.la \
- libsss_util.la \
+ libsss_certmap.la \
+ $(SSSD_INTERNAL_LTLIBS) \
$(NULL)
libsss_ldap_common_la_LDFLAGS = \
-avoid-version \
@@ -3850,9 +3860,14 @@ libsss_krb5_common_la_CFLAGS = \
$(AM_CFLAGS) \
$(KRB5_CFLAGS)
libsss_krb5_common_la_LIBADD = \
+ $(TALLOC_LIBS) \
+ $(TEVENT_LIBS) \
+ $(LDB_LIBS) \
$(KEYUTILS_LIBS) \
$(DHASH_LIBS) \
- $(KRB5_LIBS)
+ $(KRB5_LIBS) \
+ $(SSSD_INTERNAL_LTLIBS) \
+ $(NULL)
libsss_krb5_common_la_LDFLAGS = \
-avoid-version
@@ -3863,6 +3878,8 @@ libsss_ldap_la_CFLAGS = \
$(AM_CFLAGS) \
$(OPENLDAP_CFLAGS)
libsss_ldap_la_LIBADD = \
+ $(TALLOC_LIBS) \
+ $(TEVENT_LIBS) \
$(OPENLDAP_LIBS) \
$(SSSD_INTERNAL_LTLIBS) \
libsss_ldap_common.la \
@@ -3884,7 +3901,15 @@ libsss_proxy_la_SOURCES = \
libsss_proxy_la_CFLAGS = \
$(AM_CFLAGS)
libsss_proxy_la_LIBADD = \
- $(PAM_LIBS)
+ $(LIBADD_DL) \
+ $(TALLOC_LIBS) \
+ $(TEVENT_LIBS) \
+ $(LDB_LIBS) \
+ $(PAM_LIBS) \
+ $(DHASH_LIBS) \
+ $(DBUS_LIBS) \
+ $(SSSD_INTERNAL_LTLIBS) \
+ $(NULL)
libsss_proxy_la_LDFLAGS = \
-avoid-version \
-module
@@ -3899,7 +3924,11 @@ libsss_files_la_CFLAGS = \
$(AM_CFLAGS) \
$(NULL)
libsss_files_la_LIBADD = \
+ $(TALLOC_LIBS) \
+ $(TEVENT_LIBS) \
+ $(LDB_LIBS) \
$(PAM_LIBS) \
+ $(SSSD_INTERNAL_LTLIBS) \
$(NULL)
libsss_files_la_LDFLAGS = \
-avoid-version \
@@ -3911,6 +3940,12 @@ libsss_simple_la_SOURCES = \
src/providers/simple/simple_access.c
libsss_simple_la_CFLAGS = \
$(AM_CFLAGS)
+libsss_simple_la_LIBADD = \
+ $(TALLOC_LIBS) \
+ $(TEVENT_LIBS) \
+ $(LDB_LIBS) \
+ $(SSSD_INTERNAL_LTLIBS) \
+ $(NULL)
libsss_simple_la_LDFLAGS = \
-avoid-version \
-module
@@ -3922,8 +3957,10 @@ libsss_krb5_la_CFLAGS = \
$(DHASH_CFLAGS) \
$(KRB5_CFLAGS)
libsss_krb5_la_LIBADD = \
+ $(TALLOC_LIBS) \
$(DHASH_LIBS) \
$(KRB5_LIBS) \
+ $(PCRE_LIBS) \
$(SSSD_INTERNAL_LTLIBS) \
libsss_krb5_common.la
libsss_krb5_la_LDFLAGS = \
@@ -3985,6 +4022,8 @@ libsss_ipa_la_CFLAGS = \
$(NDR_KRB5PAC_CFLAGS) \
$(KRB5_CFLAGS)
libsss_ipa_la_LIBADD = \
+ $(LDB_LIBS) \
+ $(DBUS_LIBS) \
$(OPENLDAP_LIBS) \
$(DHASH_LIBS) \
$(NDR_NBT_LIBS) \
@@ -4061,9 +4100,11 @@ libsss_ad_la_CFLAGS = \
$(NDR_KRB5PAC_CFLAGS) \
$(SMBCLIENT_CFLAGS)
libsss_ad_la_LIBADD = \
+ $(LDB_LIBS) \
$(OPENLDAP_LIBS) \
$(SASL_LIBS) \
$(DHASH_LIBS) \
+ $(INI_CONFIG_LIBS) \
$(KRB5_LIBS) \
$(NDR_NBT_LIBS) \
$(NDR_KRB5PAC_LIBS) \
@@ -4223,6 +4264,7 @@ memberof_la_CFLAGS = \
$(NULL)
memberof_la_LIBADD = \
libsss_debug.la \
+ $(TALLOC_LIBS) \
$(LDB_LIBS) \
$(DHASH_LIBS) \
$(NULL)
--
2.15.1

View File

@ -34,7 +34,7 @@
Name: sssd
Version: 1.16.0
Release: 9%{?dist}
Release: 10%{?dist}
Group: Applications/System
Summary: System Security Services Daemon
License: GPLv3+
@ -121,6 +121,7 @@ Patch0076: 0076-confdb-Move-detection-files-to-separate-function.patch
Patch0077: 0077-confdb-Fix-starting-of-implicit-files-domain.patch
Patch0078: 0078-confdb-Do-not-start-implicit_files-with-proxy-domain.patch
Patch0079: 0079-test_files_provider-Regression-test-for-implicit_fil.patch
Patch0080: 0080-BUILD-Add-missing-libs-found-by-Wl-z-defs.patch
Patch0502: 0502-SYSTEMD-Use-capabilities.patch
Patch0503: 0503-Disable-stopping-idle-socket-activated-responders.patch
@ -1323,6 +1324,9 @@ fi
%{_libdir}/%{name}/modules/libwbclient.so
%changelog
* Tue Feb 06 2018 Lukas Slebodnik <lslebodn@fedoraproject.org> - 1.16.0-10
- Resolves: rhbz#1431153 - sssd: libsss_proxy.so needs to be linked with -ldl
* Thu Jan 25 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.16.0-9
- Fix systemd executions/requirements