From 87ff7dae59ccdc7307f720aa38c310fa543941f8 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 9 Aug 2024 22:04:22 +0300 Subject: [PATCH] auth: Fix linking problems when using lua as plugin After recent changes passdb-template was used only by the Lua code. If it was built as plugin, there was nothing in auth binary that used it, so linker dropped it entirely. This drop happens only for symbols within .a libraries. Fixed by not building libauth.a at all. --- src/auth/Makefile.am | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/auth/Makefile.am b/src/auth/Makefile.am index 9c4b1112d4..2a672d08b9 100644 --- a/src/auth/Makefile.am +++ b/src/auth/Makefile.am @@ -1,4 +1,3 @@ -noinst_LTLIBRARIES = libauth.la auth_moduledir = $(moduledir)/auth # automake seems to force making this unconditional.. @@ -63,20 +62,18 @@ AM_CPPFLAGS = \ auth_LDFLAGS = -export-dynamic auth_libs = \ - libauth.la \ $(AUTH_LUA_LIBS) \ $(LIBDOVECOT_SQL) auth_CPPFLAGS = $(AM_CPPFLAGS) $(BINARY_CFLAGS) auth_LDADD = $(auth_libs) $(LIBDOVECOT) $(AUTH_LIBS) $(BINARY_LDFLAGS) $(AUTH_LUA_LDADD) auth_DEPENDENCIES = $(auth_libs) $(LIBDOVECOT_DEPS) -auth_SOURCES = main.c +auth_SOURCES = main.c $(auth_common_sources) ldap_sources = db-ldap.c db-ldap-settings.c passdb-ldap.c userdb-ldap.c lua_sources = db-lua.c passdb-lua.c userdb-lua.c -libauth_la_DEPENDENCIES = $(LIBDOVECOT_DEPS) -libauth_la_SOURCES = \ +auth_common_sources = \ auth.c \ auth-cache.c \ auth-client-connection.c \ @@ -220,6 +217,7 @@ test_auth_cache_DEPENDENCIES = $(pkglibexec_PROGRAMS) $(LIBDOVECOT_DEPS) test_auth_cache_CPPFLAGS = $(AM_CPPFLAGS) test_auth_SOURCES = \ + $(auth_common_sources) \ test-auth-request-var-expand.c \ test-auth-request-fields.c \ test-username-filter.c \ @@ -232,6 +230,7 @@ test_auth_LDADD = $(LIBDOVECOT) $(auth_libs) $(AUTH_LIBS) $(LUA_LIBS) test_auth_DEPENDENCIES = $(pkglibexec_PROGRAMS) $(LIBDOVECOT_DEPS) test_mech_SOURCES = \ + $(auth_common_sources) \ test-auth.c \ test-mock.c \ test-mech.c @@ -240,6 +239,7 @@ test_mech_LDADD = $(LIBDOVECOT) $(auth_libs) $(AUTH_LIBS) $(LUA_LIBS) test_mech_DEPENDENCIES = $(pkglibexec_PROGRAMS) $(LIBDOVECOT_DEPS) test_auth_client_SOURCES = \ + $(auth_common_sources) \ test-auth.c \ test-mock.c \ test-auth-client.c @@ -248,6 +248,7 @@ test_auth_client_LDADD = $(LIBDOVECOT) $(auth_libs) $(AUTH_LIBS) $(LUA_LIBS) test_auth_client_DEPENDENCIES = $(pkglibexec_PROGRAMS) $(LIBDOVECOT_DEPS) test_auth_master_SOURCES = \ + $(auth_common_sources) \ test-auth.c \ test-mock.c \ test-auth-master.c \ -- 2.47.3