From 717008c8c3f29f3a1a77266cc72a6cfa616bf295 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Wed, 16 Oct 2013 13:23:48 +0200 Subject: BUILD: Link libsss_krb5_common.so to libkeyutils.so The symbol add_key (from libkeyutils) is used by function add_user_to_delayed_online_authentication (from file src/providers/krb5/krb5_delayed_online_authentication.c) which is part of libsss_krb5_common.so Fixes following error: [sssd[be[default]]] [load_backend_module] (0x0010): Unable to load ad module with path (/usr/lib64/sssd/libsss_ad.so), error: /usr/lib64/sssd/libsss_krb5_common.so: undefined symbol: add_key -lkeyutils was passed to the libraries libsss_{krb5,ipa,ad}.so, but when compiling with -Wl,--as-needed this flag will be ignored, since it is not used directly. So it was unavailable to libsss_krb5_common.so which actually needs it. This patch removes $(KEYUTILS_LIBS) from those libraries and adds it to libsss_krb5_common.so Reviewed-by: Jakub Hrozek Reviewed-by: Simo Sorce --- Makefile.am | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index de86d2bc..295851bc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1857,6 +1857,8 @@ libsss_krb5_common_la_SOURCES = \ src/providers/krb5/krb5_access.c \ src/providers/krb5/krb5_child_handler.c \ src/providers/krb5/krb5_init_shared.c +libsss_krb5_common_la_LIBADD = \ + $(KEYUTILS_LIBS) libsss_krb5_common_la_LDFLAGS = \ -avoid-version libsss_krb5_common_la_CFLAGS = \ @@ -1928,7 +1930,6 @@ libsss_krb5_la_CFLAGS = \ libsss_krb5_la_LIBADD = \ $(SYSTEMD_LOGIN_LIBS) \ $(DHASH_LIBS) \ - $(KEYUTILS_LIBS) \ $(KRB5_LIBS) \ libsss_krb5_common.la libsss_krb5_la_LDFLAGS = \ @@ -1982,7 +1983,6 @@ libsss_ipa_la_LIBADD = \ $(OPENLDAP_LIBS) \ $(DHASH_LIBS) \ $(NDR_NBT_LIBS) \ - $(KEYUTILS_LIBS) \ $(KRB5_LIBS) \ $(SELINUX_LIBS) \ libsss_ldap_common.la \ @@ -2045,7 +2045,6 @@ libsss_ad_la_LIBADD = \ $(OPENLDAP_LIBS) \ $(SASL_LIBS) \ $(DHASH_LIBS) \ - $(KEYUTILS_LIBS) \ $(KRB5_LIBS) \ $(NDR_NBT_LIBS) \ libsss_ldap_common.la \ -- cgit