From 6656d56536635b01af4586ca4c9c6d78f61f50d8 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 22 Sep 2024 13:04:03 +0200 Subject: [PATCH] build: join libgxs_dnsbl_filter and libgxs_user_filter plugins The two are always loaded together, so combine the object files. --- Makefile.am | 26 ++++++++++---------------- exch/http/main.cpp | 4 ++-- mda/smtp/main.cpp | 4 ++-- mra/imap/main.cpp | 4 ++-- mra/pop3/main.cpp | 4 ++-- 5 files changed, 18 insertions(+), 24 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8140bbf93..9708f9190 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,7 +8,7 @@ AM_LDFLAGS = ${my_LDFLAGS} AM_DISTCHECK_CONFIGURE_FLAGS = --with-dcprefix='$${prefix}' AM_TESTS_ENVIRONMENT = export TEST_PATH=${top_srcdir}/data; -lib_LTLIBRARIES = libgromox_auth.la libgromox_common.la libgromox_dbop.la libgromox_email.la libgromox_epoll.la libgromox_mapi.la libgromox_exrpc.la libgromox_rpc.la ${program_plugins} +lib_LTLIBRARIES = libgromox_auth.la libgromox_authz.la libgromox_common.la libgromox_dbop.la libgromox_email.la libgromox_epoll.la libgromox_mapi.la libgromox_exrpc.la libgromox_rpc.la ${program_plugins} noinst_LTLIBRARIES = libphp_mapi.la pkglibexec_PROGRAMS = cgkrepair delivery delivery-queue event gromox-snapshot http imap midb pop3 timer zcore tools/eidprint pkglib_LTLIBRARIES = libmapi4zf.la @@ -51,14 +51,12 @@ proc_plugins = \ libgxp_exchange_nsp.la \ libgxp_exchange_rfr.la svc_plugins = \ - libgxs_dnsbl_filter.la \ libgxs_exmdb_provider.la \ libgxs_event_proxy.la \ libgxs_event_stub.la \ libgxs_midb_agent.la \ libgxs_timer_agent.la \ - libgxs_mysql_adaptor.la libgxs_ruleproc.la \ - libgxs_user_filter.la + libgxs_mysql_adaptor.la libgxs_ruleproc.la sbin_PROGRAMS = gromox-abktconv gromox-compress gromox-dbop gromox-dscli gromox-e2ghelper gromox-eml2mbox gromox-eml2mt gromox-exm2eml gromox-mailq gromox-mbck gromox-mbop gromox-mkmidb gromox-mkprivate gromox-mkpublic gromox-kdb2mt gromox-mt2exm if HAVE_ESEDB sbin_PROGRAMS += gromox-edb2mt @@ -79,6 +77,10 @@ libgromox_auth_la_SOURCES = exch/authmgr.cpp exch/ldap_adaptor.cpp exch/ldap_ada libgromox_auth_la_LDFLAGS = ${default_SYFLAGS} libgromox_auth_la_LIBADD = ${libcrypto_LIBS} ${libHX_LIBS} ${jsoncpp_LIBS} ${libldap_LIBS} ${pam_LIBS} libgromox_common.la EXTRA_libgromox_auth_la_DEPENDENCIES = default.sym +libgromox_authz_la_SOURCES = exch/dnsbl_filter.cpp exch/user_filter.cpp +libgromox_authz_la_LDFLAGS = ${default_SYFLAGS} +libgromox_authz_la_LIBADD = -lpthread ${ldns_LIBS} ${libHX_LIBS} ${resolv_LIBS} libgromox_common.la +EXTRA_libgromox_authz_la_DEPENDENCIES = default.sym libgromox_common_la_CXXFLAGS = ${AM_CXXFLAGS} libgromox_common_la_SOURCES = lib/bounce_gen.cpp lib/cookie_parser.cpp lib/cryptoutil.cpp lib/dbhelper.cpp lib/double_list.cpp lib/fopen.cpp lib/guid2.cpp lib/list_file.cpp lib/mail_func.cpp lib/oxoabkt.cpp lib/rfbl.cpp lib/simple_tree.cpp lib/stream.cpp lib/svc_loader.cpp lib/textmaps.cpp lib/util.cpp lib/wintz.cpp lib/mapi/ext_buffer.cpp libgromox_common_la_LIBADD = -lpthread ${crypt_LIBS} ${libcrypto_LIBS} ${libHX_LIBS} ${libidn_LIBS} ${iconv_LIBS} ${jsoncpp_LIBS} ${sqlite_LIBS} ${libssl_LIBS} ${tinyxml2_LIBS} ${vmime_LIBS} ${libzstd_LIBS} @@ -103,7 +105,7 @@ libgromox_rpc_la_LIBADD = ${libcrypto_LIBS} ${libHX_LIBS} ${iconv_LIBS} libgromo delivery_SOURCES = mda/delivery_app/delivery.hpp mda/delivery_app/main.cpp mda/delivery_app/message_dequeue.cpp mda/delivery_app/transporter.cpp delivery_LDADD = -lpthread ${libHX_LIBS} ${libssl_LIBS} ${vmime_LIBS} libgromox_auth.la libgromox_common.la libgromox_email.la libgromox_mapi.la libgxm_alias_resolve.la libgxm_exmdb_local.la libgxs_mysql_adaptor.la libgxs_ruleproc.la delivery_queue_SOURCES = mda/message_enqueue.cpp mda/smtp/flusher.cpp mda/smtp/main.cpp mda/smtp/resource.cpp mda/smtp/smtp_cmd_handler.cpp mda/smtp/smtp_cmd_handler.hpp mda/smtp/smtp_aux.hpp mda/smtp/smtp_parser.cpp mda/smtp/smtp_parser.hpp -delivery_queue_LDADD = -lpthread ${libcrypto_LIBS} ${libHX_LIBS} ${libssl_LIBS} libgromox_auth.la libgromox_common.la libgromox_epoll.la libgxs_dnsbl_filter.la libgxs_mysql_adaptor.la libgxs_user_filter.la +delivery_queue_LDADD = -lpthread ${libcrypto_LIBS} ${libHX_LIBS} ${libssl_LIBS} libgromox_auth.la libgromox_authz.la libgromox_common.la libgromox_epoll.la libgxs_mysql_adaptor.la libgxm_alias_resolve_la_SOURCES = mda/alias_resolve.cpp mda/mdabounce.cpp mda/mdabounce.hpp lib/bounce_mda.cpp libgxm_alias_resolve_la_LDFLAGS = ${default_SYFLAGS} libgxm_alias_resolve_la_LIBADD = -lpthread ${libHX_LIBS} ${mysql_LIBS} libgromox_common.la libgromox_email.la @@ -114,9 +116,9 @@ libgxm_exmdb_local_la_LIBADD = -lpthread ${libHX_LIBS} ${jsoncpp_LIBS} libgromox EXTRA_libgxm_exmdb_local_la_DEPENDENCIES = default.sym pop3_SOURCES = mra/midb_agent.hpp mra/pop3/main.cpp mra/pop3/pop3.hpp mra/pop3/pop3_cmd_handler.cpp mra/pop3/pop3_parser.cpp mra/pop3/resource.cpp -pop3_LDADD = -lpthread ${libcrypto_LIBS} ${libHX_LIBS} ${libssl_LIBS} libgromox_auth.la libgromox_common.la libgromox_epoll.la libgromox_exrpc.la libgxs_dnsbl_filter.la libgxs_event_proxy.la libgxs_midb_agent.la libgxs_mysql_adaptor.la libgxs_user_filter.la +pop3_LDADD = -lpthread ${libcrypto_LIBS} ${libHX_LIBS} ${libssl_LIBS} libgromox_auth.la libgromox_authz.la libgromox_common.la libgromox_epoll.la libgromox_exrpc.la libgxs_event_proxy.la libgxs_midb_agent.la libgxs_mysql_adaptor.la imap_SOURCES = mra/midb_agent.hpp mra/imap/imap.hpp mra/imap/imap_cmd_parser.cpp mra/imap/imap_parser.cpp mra/imap/main.cpp mra/imap/resource.cpp -imap_LDADD = -lpthread ${libcrypto_LIBS} ${fmt_LIBS} ${libHX_LIBS} ${jsoncpp_LIBS} ${libssl_LIBS} libgromox_auth.la libgromox_common.la libgromox_epoll.la libgromox_email.la libgromox_exrpc.la libgxs_dnsbl_filter.la libgxs_event_proxy.la libgxs_event_stub.la libgxs_midb_agent.la libgxs_mysql_adaptor.la libgxs_user_filter.la +imap_LDADD = -lpthread ${libcrypto_LIBS} ${fmt_LIBS} ${libHX_LIBS} ${jsoncpp_LIBS} ${libssl_LIBS} libgromox_auth.la libgromox_authz.la libgromox_common.la libgromox_epoll.la libgromox_email.la libgromox_exrpc.la libgxs_event_proxy.la libgxs_event_stub.la libgxs_midb_agent.la libgxs_mysql_adaptor.la libgxs_event_proxy_la_SOURCES = mra/event_proxy.cpp libgxs_event_proxy_la_LDFLAGS = ${default_SYFLAGS} libgxs_event_proxy_la_LIBADD = -lpthread ${libHX_LIBS} libgromox_common.la @@ -131,7 +133,7 @@ libgxs_midb_agent_la_LIBADD = -lpthread ${libHX_LIBS} libgromox_common.la EXTRA_libgxs_midb_agent_la_DEPENDENCIES = default.sym http_SOURCES = exch/http/hpm_processor.cpp exch/http/hpm_processor.hpp exch/http/http_parser.cpp exch/http/http_parser.hpp exch/http/listener.cpp exch/http/listener.hpp exch/http/main.cpp exch/http/mod_cache.cpp exch/http/mod_cache.hpp exch/http/mod_fastcgi.cpp exch/http/mod_fastcgi.hpp exch/http/mod_rewrite.cpp exch/http/mod_rewrite.hpp exch/http/pdu_ndr.cpp exch/http/pdu_ndr.hpp exch/http/pdu_ndr_ids.hpp exch/http/pdu_processor.cpp exch/http/pdu_processor.hpp exch/http/resource.hpp exch/http/system_services.cpp exch/http/system_services.hpp -http_LDADD = -lpthread ${libcrypto_LIBS} ${fmt_LIBS} ${gss_LIBS} ${libHX_LIBS} ${libssl_LIBS} libgromox_auth.la libgromox_common.la libgromox_epoll.la libgromox_email.la libgromox_rpc.la libgromox_mapi.la libgxh_ews.la libgxh_mh_emsmdb.la libgxh_mh_nsp.la libgxh_oab.la libgxh_oxdisco.la libgxp_exchange_emsmdb.la libgxp_exchange_nsp.la libgxp_exchange_rfr.la libgxs_dnsbl_filter.la libgxs_exmdb_provider.la libgxs_mysql_adaptor.la libgxs_timer_agent.la libgxs_user_filter.la +http_LDADD = -lpthread ${libcrypto_LIBS} ${fmt_LIBS} ${gss_LIBS} ${libHX_LIBS} ${libssl_LIBS} libgromox_auth.la libgromox_authz.la libgromox_common.la libgromox_epoll.la libgromox_email.la libgromox_rpc.la libgromox_mapi.la libgxh_ews.la libgxh_mh_emsmdb.la libgxh_mh_nsp.la libgxh_oab.la libgxh_oxdisco.la libgxp_exchange_emsmdb.la libgxp_exchange_nsp.la libgxp_exchange_rfr.la libgxs_exmdb_provider.la libgxs_mysql_adaptor.la libgxs_timer_agent.la midb_SOURCES = exch/midb/cmd_parser.cpp exch/midb/cmd_parser.hpp exch/midb/common_util.cpp exch/midb/common_util.hpp exch/midb/exmdb_client.hpp exch/midb/mail_engine.cpp exch/midb/mail_engine.hpp exch/midb/main.cpp exch/midb/system_services.hpp midb_LDADD = -lpthread ${libHX_LIBS} ${fmt_LIBS} ${iconv_LIBS} ${jsoncpp_LIBS} ${libssl_LIBS} ${sqlite_LIBS} libgromox_auth.la libgromox_common.la libgromox_dbop.la libgromox_email.la libgromox_exrpc.la libgromox_mapi.la libgxs_event_proxy.la libgxs_mysql_adaptor.la zcore_SOURCES = exch/gab.cpp exch/zcore/ab_tree.cpp exch/zcore/ab_tree.hpp exch/zcore/attachment_object.cpp exch/zcore/bounce_producer.hpp exch/zcore/common_util.cpp exch/zcore/common_util.hpp exch/zcore/container_object.cpp exch/zcore/exmdb_client.cpp exch/zcore/exmdb_client.hpp exch/zcore/folder_object.cpp exch/zcore/ics_state.cpp exch/zcore/ics_state.hpp exch/zcore/icsdownctx_object.cpp exch/zcore/icsupctx_object.cpp exch/zcore/main.cpp exch/zcore/message_object.cpp exch/zcore/names.cpp exch/zcore/object_tree.cpp exch/zcore/object_tree.hpp exch/zcore/objects.hpp exch/zcore/rpc_ext.cpp exch/zcore/rpc_ext.hpp exch/zcore/rpc_parser.cpp exch/zcore/rpc_parser.hpp exch/zcore/store_object.cpp exch/zcore/store_object.hpp exch/zcore/system_services.hpp exch/zcore/table_object.cpp exch/zcore/table_object.hpp exch/zcore/user_object.cpp exch/zcore/zserver.cpp exch/zcore/zserver.hpp @@ -176,10 +178,6 @@ libgxh_oab_la_SOURCES = exch/oab.cpp libgxh_oab_la_LDFLAGS = ${default_SYFLAGS} libgxh_oab_la_LIBADD = libgromox_common.la EXTRA_libgxh_oab_la_DEPENDENCIES = default.sym -libgxs_dnsbl_filter_la_SOURCES = exch/dnsbl_filter.cpp -libgxs_dnsbl_filter_la_LDFLAGS = ${default_SYFLAGS} -libgxs_dnsbl_filter_la_LIBADD = ${ldns_LIBS} ${resolv_LIBS} libgromox_common.la -EXTRA_libgxs_dnsbl_filter_la_DEPENDENCIES = default.sym libgxs_mysql_adaptor_la_SOURCES = exch/mysql_adaptor/mysql_adaptor.cpp exch/mysql_adaptor/sql2.cpp exch/mysql_adaptor/sql2.hpp libgxs_mysql_adaptor_la_LDFLAGS = ${default_SYFLAGS} libgxs_mysql_adaptor_la_LIBADD = -lpthread ${crypt_LIBS} ${libHX_LIBS} ${fmt_LIBS} ${mysql_LIBS} libgromox_common.la libgromox_dbop.la libgromox_mapi.la @@ -188,10 +186,6 @@ libgxs_ruleproc_la_SOURCES = lib/ruleproc.cpp libgxs_ruleproc_la_LDFLAGS = ${default_SYFLAGS} libgxs_ruleproc_la_LIBADD = ${vmime_LIBS} libgromox_common.la libgromox_exrpc.la EXTRA_libgxs_ruleproc_la_DEPENDENCIES = ${default_SYM} -libgxs_user_filter_la_SOURCES = exch/user_filter.cpp -libgxs_user_filter_la_LDFLAGS = ${default_SYFLAGS} -libgxs_user_filter_la_LIBADD = -lpthread ${libHX_LIBS} libgromox_common.la -EXTRA_libgxs_user_filter_la_DEPENDENCIES = default.sym cgkrepair_SOURCES = tools/cgkrepair.cpp tools/genimport.cpp tools/genimport.hpp cgkrepair_LDADD = ${gromox_mt2exm_LDADD} diff --git a/exch/http/main.cpp b/exch/http/main.cpp index 85f2f4ef1..6994435bd 100644 --- a/exch/http/main.cpp +++ b/exch/http/main.cpp @@ -66,12 +66,12 @@ static std::vector g_dfl_proc_plugins = { {"libgxp_exchange_rfr.so", PROC_exchange_rfr}, }; static std::vector g_dfl_svc_plugins = { - {"libgxs_dnsbl_filter.so", SVC_dnsbl_filter}, {"libgxs_mysql_adaptor.so", SVC_mysql_adaptor}, {"libgromox_auth.so/ldap", SVC_ldap_adaptor}, {"libgromox_auth.so/mgr", SVC_authmgr}, + {"libgromox_authz.so/dnsbl", SVC_dnsbl_filter}, + {"libgromox_authz.so/user", SVC_user_filter}, {"libgxs_timer_agent.so", SVC_timer_agent}, - {"libgxs_user_filter.so", SVC_user_filter}, {"libgxs_exmdb_provider.so", SVC_exmdb_provider}, }; diff --git a/mda/smtp/main.cpp b/mda/smtp/main.cpp index 13aa78df5..2642f5ed6 100644 --- a/mda/smtp/main.cpp +++ b/mda/smtp/main.cpp @@ -65,11 +65,11 @@ static struct HXoption g_options_table[] = { }; static std::vector g_dfl_svc_plugins = { - {"libgxs_dnsbl_filter.so", SVC_dnsbl_filter}, {"libgxs_mysql_adaptor.so", SVC_mysql_adaptor}, {"libgromox_auth.so/ldap", SVC_ldap_adaptor}, {"libgromox_auth.so/mgr", SVC_authmgr}, - {"libgxs_user_filter.so", SVC_user_filter}, + {"libgromox_authz.so/dnsbl", SVC_dnsbl_filter}, + {"libgromox_authz.so/user", SVC_user_filter}, }; static constexpr cfg_directive gromox_cfg_defaults[] = { diff --git a/mra/imap/main.cpp b/mra/imap/main.cpp index e3db90073..45d4efa0e 100644 --- a/mra/imap/main.cpp +++ b/mra/imap/main.cpp @@ -98,14 +98,14 @@ static struct HXoption g_options_table[] = { }; static std::vector g_dfl_svc_plugins = { - {"libgxs_dnsbl_filter.so", SVC_dnsbl_filter}, {"libgxs_event_proxy.so", SVC_event_proxy}, {"libgxs_event_stub.so", SVC_event_stub}, {"libgxs_midb_agent.so", SVC_midb_agent}, {"libgxs_mysql_adaptor.so", SVC_mysql_adaptor}, {"libgromox_auth.so/ldap", SVC_ldap_adaptor}, {"libgromox_auth.so/mgr", SVC_authmgr}, - {"libgxs_user_filter.so", SVC_user_filter}, + {"libgromox_authz.so/dnsbl", SVC_dnsbl_filter}, + {"libgromox_authz.so/user", SVC_user_filter}, }; static constexpr cfg_directive gromox_cfg_defaults[] = { diff --git a/mra/pop3/main.cpp b/mra/pop3/main.cpp index a915f8e10..ad5b3968a 100644 --- a/mra/pop3/main.cpp +++ b/mra/pop3/main.cpp @@ -74,13 +74,13 @@ static struct HXoption g_options_table[] = { }; static std::vector g_dfl_svc_plugins = { - {"libgxs_dnsbl_filter.so", SVC_dnsbl_filter}, {"libgxs_event_proxy.so", SVC_event_proxy}, {"libgxs_midb_agent.so", SVC_midb_agent}, {"libgxs_mysql_adaptor.so", SVC_mysql_adaptor}, {"libgromox_auth.so/ldap", SVC_ldap_adaptor}, {"libgromox_auth.so/mgr", SVC_authmgr}, - {"libgxs_user_filter.so", SVC_user_filter}, + {"libgromox_authz.so/dnsbl", SVC_dnsbl_filter}, + {"libgromox_authz.so/user", SVC_user_filter}, }; static constexpr cfg_directive gromox_cfg_defaults[] = {