commit d6f394a8569fd16a29bf80d8c4567ac1a7e9696e Author: Jacob Welsh AuthorDate: Fri Nov 4 01:05:58 2022 +0000 Commit: Jacob Welsh CommitDate: Fri Nov 4 01:05:58 2022 +0000 Type: dead code removal general pruning of defunct dynamic module system tendrils removed symbols include: .login_plugin_dir .mail_plugin_dir .version_ignore .version_string MASTER_DOVECOT_VERSION_ENV MODULEDIR MODULE_LIBS master_service_get_version_string master_service_verify_version_string module_dir_load module_dir_load_missing module_get_symbol struct module_dir_load_settings "moduledir" is still around in the build system. diff --git a/Makefile.am b/Makefile.am index 37cbc818d3..d0efe4911d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -50,7 +50,6 @@ dovecot-config: dovecot-config.in Makefile -e "s|\$$(top_builddir)|$$abs_builddir|g" \ -e "s|\$$(incdir)|$$abs_srcdir|g" \ -e "s|\$$(LIBICONV)|$(LIBICONV)|g" \ - -e "s|\$$(MODULE_LIBS)|$(MODULE_LIBS)|g" \ -e "s|^\(dovecot_pkgincludedir\)=|\1=$(pkgincludedir)|" \ -e "s|^\(dovecot_pkglibdir\)=|\1=$(pkglibdir)|" \ -e "s|^\(dovecot_pkglibexecdir\)=|\1=$(libexecdir)/dovecot|" \ diff --git a/configure.ac b/configure.ac index dbc1a79f3d..dad4f63e0d 100644 --- a/configure.ac +++ b/configure.ac @@ -581,13 +581,13 @@ LIBDOVECOT_LA_LIBS=`echo "$LIBDOVECOT_LA_LIBS" | tr -d '\t\n\\\\'` if test "$want_shared_libs" = "yes"; then LIBDOVECOT_DEPS='$(top_builddir)/src/lib-dovecot/libdovecot.la' - LIBDOVECOT="$LIBDOVECOT_DEPS \$(MODULE_LIBS)" + LIBDOVECOT="$LIBDOVECOT_DEPS" LIBDOVECOT_STORAGE_DEPS='$(top_builddir)/src/lib-storage/libdovecot-storage.la $(top_builddir)/src/lib-imap-storage/libimap-storage.la' LIBDOVECOT_LOGIN='$(top_builddir)/src/login-common/libdovecot-login.la' LIBDOVECOT_LDA='$(top_builddir)/src/lib-lda/libdovecot-lda.la' else LIBDOVECOT_DEPS="$LIBDOVECOT_LA_LIBS" - LIBDOVECOT="$LIBDOVECOT_DEPS \$(LIBICONV) \$(MODULE_LIBS)" + LIBDOVECOT="$LIBDOVECOT_DEPS \$(LIBICONV)" LIBDOVECOT_STORAGE_DEPS='$(top_builddir)/src/lib-storage/libstorage.la' LIBDOVECOT_LOGIN='$(top_builddir)/src/login-common/liblogin.la' LIBDOVECOT_LDA='$(top_builddir)/src/lib-lda/liblda.la' diff --git a/src/doveadm/Makefile.am b/src/doveadm/Makefile.am index 03527633a2..026ad94c1e 100644 --- a/src/doveadm/Makefile.am +++ b/src/doveadm/Makefile.am @@ -25,7 +25,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib-dcrypt \ -I$(top_srcdir)/src/auth \ -I$(top_srcdir)/src/stats \ - -DMODULEDIR=\""$(moduledir)"\" \ -DPKG_RUNDIR=\""$(rundir)"\" \ -DPKG_STATEDIR=\""$(statedir)"\" \ -DPKG_LIBEXECDIR=\""$(pkglibexecdir)"\" \ @@ -190,7 +189,7 @@ test_libs = \ test_deps = $(noinst_LTLIBRARIES) $(test_libs) test_doveadm_util_SOURCES = doveadm-util.c test-doveadm-util.c -test_doveadm_util_LDADD = $(test_libs) $(MODULE_LIBS) +test_doveadm_util_LDADD = $(test_libs) test_doveadm_util_DEPENDENCIES = $(test_deps) check-local: diff --git a/src/doveadm/doveadm-settings.c b/src/doveadm/doveadm-settings.c index 54d6631a9d..e4ab3adc7a 100644 --- a/src/doveadm/doveadm-settings.c +++ b/src/doveadm/doveadm-settings.c @@ -65,7 +65,6 @@ static const struct setting_define doveadm_setting_defines[] = { DEF(STR, base_dir), DEF(STR, libexec_dir), DEF(STR, mail_plugins), - DEF(STR, mail_plugin_dir), DEF(STR_VARS, mail_temp_dir), DEF(BOOL, auth_debug), DEF(STR, auth_socket_path), @@ -96,7 +95,6 @@ const struct doveadm_settings doveadm_default_settings = { .base_dir = PKG_RUNDIR, .libexec_dir = PKG_LIBEXECDIR, .mail_plugins = "", - .mail_plugin_dir = MODULEDIR, .mail_temp_dir = "/tmp", .auth_debug = FALSE, .auth_socket_path = "auth-userdb", diff --git a/src/doveadm/doveadm-settings.h b/src/doveadm/doveadm-settings.h index b3c2184401..beb35ff1c5 100644 --- a/src/doveadm/doveadm-settings.h +++ b/src/doveadm/doveadm-settings.h @@ -15,7 +15,6 @@ struct doveadm_settings { const char *base_dir; const char *libexec_dir; const char *mail_plugins; - const char *mail_plugin_dir; const char *mail_temp_dir; bool auth_debug; const char *auth_socket_path; diff --git a/src/lib-auth/Makefile.am b/src/lib-auth/Makefile.am index 4aff5f8442..9e237e1452 100644 --- a/src/lib-auth/Makefile.am +++ b/src/lib-auth/Makefile.am @@ -29,7 +29,6 @@ test_libs = \ $(noinst_LTLIBRARIES) \ ../lib-test/libtest.la \ ../lib/liblib.la \ - $(MODULE_LIBS) test_deps = \ $(noinst_LTLIBRARIES) \ diff --git a/src/lib-dcrypt/Makefile.am b/src/lib-dcrypt/Makefile.am index cbc0029464..aaf50261b3 100644 --- a/src/lib-dcrypt/Makefile.am +++ b/src/lib-dcrypt/Makefile.am @@ -54,7 +54,6 @@ LIBDOVECOT_TEST_DEPS = \ ../lib/liblib.la LIBDOVECOT_TEST = \ $(LIBDOVECOT_TEST_DEPS) \ - $(MODULE_LIBS) test_crypto_LDADD = $(LIBDOVECOT_TEST) test_crypto_DEPENDENCIES = $(LIBDOVECOT_TEST_DEPS) diff --git a/src/lib-dict-extra/Makefile.am b/src/lib-dict-extra/Makefile.am index ce4ec4f5a5..c04bbf9c11 100644 --- a/src/lib-dict-extra/Makefile.am +++ b/src/lib-dict-extra/Makefile.am @@ -26,7 +26,7 @@ test_libs = \ ../lib/liblib.la test_dict_fs_SOURCES = test-dict-fs.c -test_dict_fs_LDADD = $(noinst_LTLIBRARIES) ../lib-fs/libfs.la $(test_libs) $(MODULE_LIBS) +test_dict_fs_LDADD = $(noinst_LTLIBRARIES) ../lib-fs/libfs.la $(test_libs) test_dict_fs_DEPENDENCIES = $(noinst_LTLIBRARIES) ../lib-fs/libfs.la $(test_libs) check-local: diff --git a/src/lib-dovecot/Makefile.am b/src/lib-dovecot/Makefile.am index 7856cf3b80..3fe935ec0d 100644 --- a/src/lib-dovecot/Makefile.am +++ b/src/lib-dovecot/Makefile.am @@ -4,7 +4,6 @@ libdovecot_la_SOURCES = libdovecot_la_LIBADD = \ $(LIBDOVECOT_LA_LIBS) \ - $(MODULE_LIBS) \ $(RELRO_LDFLAGS) libdovecot_la_DEPENDENCIES = $(LIBDOVECOT_LA_LIBS) diff --git a/src/lib-fs/Makefile.am b/src/lib-fs/Makefile.am index 0b71196edb..d0fc17f91b 100644 --- a/src/lib-fs/Makefile.am +++ b/src/lib-fs/Makefile.am @@ -53,7 +53,6 @@ test_deps = \ test_libs = \ $(test_deps) \ - $(MODULE_LIBS) test_fs_metawrap_SOURCES = test-fs-metawrap.c test_fs_metawrap_LDADD = $(test_libs) diff --git a/src/lib-http/Makefile.am b/src/lib-http/Makefile.am index 081d39ffe1..9951f651e4 100644 --- a/src/lib-http/Makefile.am +++ b/src/lib-http/Makefile.am @@ -78,7 +78,6 @@ noinst_PROGRAMS = $(test_programs) $(test_nocheck_programs) test_libs = \ ../lib-test/libtest.la \ ../lib/liblib.la \ - $(MODULE_LIBS) test_deps = \ $(noinst_LTLIBRARIES) \ diff --git a/src/lib-imap-client/Makefile.am b/src/lib-imap-client/Makefile.am index 8fe8a8d091..342fbd2f24 100644 --- a/src/lib-imap-client/Makefile.am +++ b/src/lib-imap-client/Makefile.am @@ -41,7 +41,6 @@ test_deps = \ test_libs = \ $(test_deps) \ - $(MODULE_LIBS) test_imapc_client_SOURCES = test-imapc-client.c test_imapc_client_LDADD = $(test_libs) diff --git a/src/lib-master/master-interface.h b/src/lib-master/master-interface.h index e5db7ce720..f06c0701c9 100644 --- a/src/lib-master/master-interface.h +++ b/src/lib-master/master-interface.h @@ -66,10 +66,6 @@ enum master_login_state { /* getenv(MASTER_CONFIG_FILE_ENV) provides path to configuration file/socket */ #define MASTER_CONFIG_FILE_ENV "CONFIG_FILE" -/* getenv(MASTER_DOVECOT_VERSION_ENV) provides master's version number - (unset if version_ignore=yes) */ -#define MASTER_DOVECOT_VERSION_ENV "DOVECOT_VERSION" - /* getenv(MASTER_SSL_KEY_PASSWORD_ENV) returns manually typed SSL key password, if dovecot was started with -p parameter. */ #define MASTER_SSL_KEY_PASSWORD_ENV "SSL_KEY_PASSWORD" diff --git a/src/lib-master/master-service-private.h b/src/lib-master/master-service-private.h index 429f2eb713..0d4e9f8156 100644 --- a/src/lib-master/master-service-private.h +++ b/src/lib-master/master-service-private.h @@ -31,7 +31,6 @@ struct master_service { int argc; char **argv; - const char *version_string; char *config_path; ARRAY_TYPE(const_string) config_overrides; int config_fd; diff --git a/src/lib-master/master-service-settings.c b/src/lib-master/master-service-settings.c index f0f0797f43..1f96084e46 100644 --- a/src/lib-master/master-service-settings.c +++ b/src/lib-master/master-service-settings.c @@ -51,7 +51,6 @@ static const struct setting_define master_service_setting_defines[] = { DEF(STR, import_environment), DEF(STR, stats_writer_socket_path), DEF(SIZE, config_cache_size), - DEF(BOOL, version_ignore), DEF(BOOL, shutdown_clients), DEF(BOOL, verbose_proctitle), @@ -89,7 +88,6 @@ static const struct master_service_settings master_service_default_settings = { .import_environment = "TZ CORE_OUTOFMEM CORE_ERROR" ENV_SYSTEMD ENV_GDB, .stats_writer_socket_path = "stats-writer", .config_cache_size = 1024*1024, - .version_ignore = FALSE, .shutdown_clients = TRUE, .verbose_proctitle = FALSE, @@ -706,11 +704,6 @@ int master_service_settings_read(struct master_service *service, service->set = sets[0]; service->set_parser = parser; - if (service->set->version_ignore && - (service->flags & MASTER_SERVICE_FLAG_STANDALONE) != 0) { - /* running standalone. we want to ignore plugin versions. */ - service->version_string = NULL; - } if ((service->flags & MASTER_SERVICE_FLAG_DONT_SEND_STATS) == 0 && (service->flags & MASTER_SERVICE_FLAG_STANDALONE) != 0) { /* When running standalone (e.g. doveadm) try to connect to the diff --git a/src/lib-master/master-service-settings.h b/src/lib-master/master-service-settings.h index eceec0c6e2..8c6f73fe5c 100644 --- a/src/lib-master/master-service-settings.h +++ b/src/lib-master/master-service-settings.h @@ -24,7 +24,6 @@ struct master_service_settings { const char *import_environment; const char *stats_writer_socket_path; uoff_t config_cache_size; - bool version_ignore; bool shutdown_clients; bool verbose_proctitle; diff --git a/src/lib-master/master-service.c b/src/lib-master/master-service.c index a92c0a8d66..c34d76e832 100644 --- a/src/lib-master/master-service.c +++ b/src/lib-master/master-service.c @@ -33,9 +33,6 @@ /* getenv(MASTER_CONFIG_FILE_ENV) provides path to configuration file/socket */ #define MASTER_CONFIG_FILE_ENV "CONFIG_FILE" -/* getenv(MASTER_DOVECOT_VERSION_ENV) provides master's version number */ -#define MASTER_DOVECOT_VERSION_ENV "DOVECOT_VERSION" - /* when we're full of connections, how often to check if login state has changed. we normally notice it immediately because of a signal, so this is just a fallback against race conditions. */ @@ -151,17 +148,6 @@ master_service_event_callback(struct event *event, return TRUE; } -static void master_service_verify_version_string(struct master_service *service) -{ - if (service->version_string != NULL && - strcmp(service->version_string, PACKAGE_VERSION) != 0) { - i_fatal("Dovecot version mismatch: " - "Master is v%s, %s is v"PACKAGE_VERSION" " - "(if you don't care, set version_ignore=yes)", - service->version_string, service->name); - } -} - static void master_service_init_socket_listeners(struct master_service *service) { unsigned int i; @@ -296,12 +282,8 @@ master_service_init(const char *name, enum master_service_flags flags, else service->config_path_from_master = TRUE; - if ((flags & MASTER_SERVICE_FLAG_STANDALONE) == 0) { - service->version_string = getenv(MASTER_DOVECOT_VERSION_ENV); + if ((flags & MASTER_SERVICE_FLAG_STANDALONE) == 0) service->socket_count = 1; - } else { - service->version_string = PACKAGE_VERSION; - } /* listener configuration */ value = getenv("SOCKET_COUNT"); @@ -405,7 +387,6 @@ master_service_init(const char *name, enum master_service_flags flags, service->stats_client = stats_client_init(value, FALSE); } - master_service_verify_version_string(service); return service; } @@ -847,11 +828,6 @@ const char *master_service_get_config_path(struct master_service *service) return service->config_path; } -const char *master_service_get_version_string(struct master_service *service) -{ - return service->version_string; -} - const char *master_service_get_name(struct master_service *service) { return service->name; diff --git a/src/lib-master/master-service.h b/src/lib-master/master-service.h index bd32ad0cc6..ee6a8e5075 100644 --- a/src/lib-master/master-service.h +++ b/src/lib-master/master-service.h @@ -199,9 +199,6 @@ const char *master_service_get_socket_name(struct master_service *service, /* Returns configuration file path. */ const char *master_service_get_config_path(struct master_service *service); -/* Returns PACKAGE_VERSION or NULL if version_ignore=yes. This function is - useful mostly as parameter to module_dir_load(). */ -const char *master_service_get_version_string(struct master_service *service); /* Returns name of the service, as given in name parameter to _init(). */ const char *master_service_get_name(struct master_service *service); /* Returns name of the service, as given in the configuration file. For example diff --git a/src/lib-oauth2/Makefile.am b/src/lib-oauth2/Makefile.am index 458b61274c..7ece5fc885 100644 --- a/src/lib-oauth2/Makefile.am +++ b/src/lib-oauth2/Makefile.am @@ -38,8 +38,7 @@ test_libs = \ ../lib-dict/libdict.la \ ../lib-settings/libsettings.la \ ../lib-test/libtest.la \ - ../lib/liblib.la \ - $(MODULE_LIBS) + ../lib/liblib.la test_deps = \ $(noinst_LTLIBRARIES) \ ../lib-dcrypt/libdcrypt.la \ diff --git a/src/lib-program-client/Makefile.am b/src/lib-program-client/Makefile.am index 4198606d67..f746a0ca9a 100644 --- a/src/lib-program-client/Makefile.am +++ b/src/lib-program-client/Makefile.am @@ -34,7 +34,6 @@ test_libs = \ ../lib-mail/libmail.la \ ../lib-charset/libcharset.la \ ../lib/liblib.la \ - $(MODULE_LIBS) test_program_client_local_SOURCE = test-program-client-local.c test_program_client_local_LDADD = $(test_libs) diff --git a/src/lib-smtp/Makefile.am b/src/lib-smtp/Makefile.am index a16dc68672..a397df90cf 100644 --- a/src/lib-smtp/Makefile.am +++ b/src/lib-smtp/Makefile.am @@ -110,7 +110,6 @@ test_libs = \ ../lib-sasl/libsasl.la \ ../lib-test/libtest.la \ ../lib/liblib.la \ - $(MODULE_LIBS) test_deps = \ $(noinst_LTLIBRARIES) \ diff --git a/src/lib-storage/Makefile.am b/src/lib-storage/Makefile.am index ddf4c9a83b..0b0b2b0c44 100644 --- a/src/lib-storage/Makefile.am +++ b/src/lib-storage/Makefile.am @@ -18,7 +18,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib-imap \ -I$(top_srcdir)/src/lib-index \ -DPKG_RUNDIR=\""$(rundir)"\" \ - -DMODULEDIR=\""$(moduledir)"\" libstorage_la_SOURCES = \ fail-mail-storage.c \ diff --git a/src/lib-storage/mail-storage-service.c b/src/lib-storage/mail-storage-service.c index 35b0151770..822549dac3 100644 --- a/src/lib-storage/mail-storage-service.c +++ b/src/lib-storage/mail-storage-service.c @@ -938,17 +938,9 @@ mail_storage_service_init(struct master_service *service, enum mail_storage_service_flags flags) { struct mail_storage_service_ctx *ctx; - const char *version; pool_t pool; unsigned int count; - version = master_service_get_version_string(service); - if (version != NULL && strcmp(version, PACKAGE_VERSION) != 0) { - i_fatal("Version mismatch: libdovecot-storage.so is '%s', " - "while the running Dovecot binary is '%s'", - PACKAGE_VERSION, version); - } - if ((flags & MAIL_STORAGE_SERVICE_FLAG_TEMP_PRIV_DROP) != 0 && getuid() != 0) { /* service { user } isn't root. the permission drop can't be diff --git a/src/lib-storage/mail-storage-settings.c b/src/lib-storage/mail-storage-settings.c index 9421956e3a..08b80d1aff 100644 --- a/src/lib-storage/mail-storage-settings.c +++ b/src/lib-storage/mail-storage-settings.c @@ -288,7 +288,6 @@ static const struct setting_define mail_user_setting_defines[] = { DEF(UINT, last_valid_gid), DEF(STR, mail_plugins), - DEF(STR, mail_plugin_dir), DEF(STR, mail_log_prefix), @@ -321,7 +320,6 @@ static const struct mail_user_settings mail_user_default_settings = { .last_valid_gid = 0, .mail_plugins = "", - .mail_plugin_dir = MODULEDIR, .mail_log_prefix = "%s(%u)<%{pid}><%{session}>: ", @@ -714,14 +712,6 @@ static bool mail_user_settings_check(void *_set, pool_t pool ATTR_UNUSED, p_strconcat(pool, SETTING_STRVAR_UNEXPANDED, "postmaster@", set->hostname, NULL); } -#else - if (*set->mail_plugins != '\0' && - access(set->mail_plugin_dir, R_OK | X_OK) < 0) { - *error_r = t_strdup_printf( - "mail_plugin_dir: access(%s) failed: %m", - set->mail_plugin_dir); - return FALSE; - } #endif return TRUE; } diff --git a/src/lib-storage/mail-storage-settings.h b/src/lib-storage/mail-storage-settings.h index 9dc8f5d82c..f90dce3f41 100644 --- a/src/lib-storage/mail-storage-settings.h +++ b/src/lib-storage/mail-storage-settings.h @@ -127,7 +127,6 @@ struct mail_user_settings { unsigned int first_valid_gid, last_valid_gid; const char *mail_plugins; - const char *mail_plugin_dir; const char *mail_log_prefix; diff --git a/src/lib/module-dir.c b/src/lib/module-dir.c index 867f28284e..63d05fd249 100644 --- a/src/lib/module-dir.c +++ b/src/lib/module-dir.c @@ -7,6 +7,7 @@ #include "module-dir.h" static const char *module_name_drop_suffix(const char *name); +static const char *module_file_get_name(const char *fname); static void module_free(struct module *module) { @@ -136,28 +137,6 @@ void module_dir_unload(struct module **modules) *modules = NULL; } -struct module * -module_dir_load_missing(struct module *old_modules ATTR_UNUSED, - const char *dir ATTR_UNUSED, - const char *module_names, - const struct module_dir_load_settings *set ATTR_UNUSED) -{ -#define NO_SUPPORT_ERRSTR "Dynamically loadable module support not built in" - if (module_names == NULL) - i_error(NO_SUPPORT_ERRSTR); - else { - i_fatal(NO_SUPPORT_ERRSTR", can't load plugins: %s", - module_names); - } - return NULL; -} - -void *module_get_symbol(struct module *module ATTR_UNUSED, - const char *symbol ATTR_UNUSED) -{ - return NULL; -} - void *module_get_symbol_quiet(struct module *module ATTR_UNUSED, const char *symbol ATTR_UNUSED) { @@ -193,13 +172,8 @@ const char **module_parse_names(const char *module_names) return NULL; } -struct module *module_dir_load(const char *dir, const char *module_names, - const struct module_dir_load_settings *set) -{ - return module_dir_load_missing(NULL, dir, module_names, set); -} - -const char *module_file_get_name(const char *fname) +/* Returns module's base name from the filename. */ +static const char *module_file_get_name(const char *fname) { const char *p; diff --git a/src/lib/module-dir.h b/src/lib/module-dir.h index 98b4718f56..c1093d9ccc 100644 --- a/src/lib/module-dir.h +++ b/src/lib/module-dir.h @@ -1,32 +1,6 @@ #ifndef MODULE_DIR_H #define MODULE_DIR_H -struct module_dir_load_settings { - /* If abi_version is non-NULL and the module contains a version symbol, - fail the load if they're different. In both strings ignore anything - after the first '(' character, so the version can be e.g.: - 2.2.ABIv1(2.2.15) */ - const char *abi_version; - /* Binary name used for checking if plugin is tried to be loaded for - wrong binary. */ - const char *binary_name; - /* Setting name used in plugin dependency error message */ - const char *setting_name; - - /* If non-NULL, load only modules where filter_callback returns TRUE */ - bool (*filter_callback)(const char *name, void *context); - void *filter_context; - - /* Require all plugins to have _init() function */ - bool require_init_funcs:1; - /* Enable debug logging */ - bool debug:1; - /* If dlopen() fails for some modules, silently skip it. */ - bool ignore_dlopen_errors:1; - /* Don't fail if some specified modules weren't found */ - bool ignore_missing:1; -}; - struct module { char *path, *name; @@ -39,24 +13,6 @@ struct module { struct module *next; }; -/* Load modules in given directory. module_names is a space separated list of - module names to load. */ -struct module *module_dir_load(const char *dir, const char *module_names, - const struct module_dir_load_settings *set) - ATTR_NULL(2); -/* Load modules that aren't already loaded. */ -struct module * -module_dir_load_missing(struct module *old_modules, - const char *dir, const char *module_names, - const struct module_dir_load_settings *set) - ATTR_NULL(1, 3); -/* Load modules that aren't already loaded. */ -int module_dir_try_load_missing(struct module **modules, - const char *dir, const char *module_names, - const struct module_dir_load_settings *set, - const char **error_r) - ATTR_NULL(1, 3); - /* Load modules of a given type (called a "module directory" due to the prior dlopen based implementation). mod_names is a space separated list of module names to load, or NULL for all available. Each function goes in a separate file so that each module collection links into only the binaries that require it. */ void module_dir_load_adm(struct module **modules, const char *mod_names); void module_dir_load_auth(struct module **modules, const char *mod_names); @@ -76,11 +32,9 @@ void module_dir_unload(struct module **modules); /* Find a module by name. */ struct module *module_dir_find(struct module *modules, const char *name); -void *module_get_symbol(struct module *module, const char *symbol); +/* Former dlsym wrapper, left as stub until its last use can be eliminated (config/config-parser.c) */ void *module_get_symbol_quiet(struct module *module, const char *symbol); -/* Returns module's base name from the filename. */ -const char *module_file_get_name(const char *fname); /* Returns module's name without "_plugin" suffix. */ const char *module_get_plugin_name(struct module *module); diff --git a/src/lmtp/Makefile.am b/src/lmtp/Makefile.am index 316e5ccef6..ecc71cf128 100644 --- a/src/lmtp/Makefile.am +++ b/src/lmtp/Makefile.am @@ -16,7 +16,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib-storage \ -I$(top_srcdir)/src/lib-storage/index \ -I$(top_srcdir)/src/lib-storage/index/raw \ - -DMODULEDIR=\""$(moduledir)"\" \ $(BINARY_CFLAGS) lmtp_LDFLAGS = -export-dynamic \ diff --git a/src/lmtp/lmtp-settings.c b/src/lmtp/lmtp-settings.c index 1d9ecb2546..753fcc2570 100644 --- a/src/lmtp/lmtp-settings.c +++ b/src/lmtp/lmtp-settings.c @@ -75,7 +75,6 @@ static const struct setting_define lmtp_setting_defines[] = { DEF(STR, login_trusted_networks), DEF(STR, mail_plugins), - DEF(STR, mail_plugin_dir), SETTING_DEFINE_LIST_END }; @@ -97,7 +96,6 @@ static const struct lmtp_settings lmtp_default_settings = { .login_trusted_networks = "", .mail_plugins = "", - .mail_plugin_dir = MODULEDIR, }; static const struct setting_parser_info *lmtp_setting_dependencies[] = { diff --git a/src/lmtp/lmtp-settings.h b/src/lmtp/lmtp-settings.h index 3b2eaa3380..989a32b373 100644 --- a/src/lmtp/lmtp-settings.h +++ b/src/lmtp/lmtp-settings.h @@ -35,7 +35,6 @@ struct lmtp_settings { const char *login_trusted_networks; const char *mail_plugins; - const char *mail_plugin_dir; enum lmtp_hdr_delivery_address parsed_lmtp_hdr_delivery_address; diff --git a/src/login-common/Makefile.am b/src/login-common/Makefile.am index 9b99e0f65d..4cbcbe1b8b 100644 --- a/src/login-common/Makefile.am +++ b/src/login-common/Makefile.am @@ -9,7 +9,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib-ssl-iostream \ -I$(top_srcdir)/src/lib-mail \ -DPKG_STATEDIR=\""$(statedir)"\" \ - -DMODULEDIR=\""$(moduledir)"\" liblogin_la_SOURCES = \ access-lookup.c \ diff --git a/src/login-common/login-settings.c b/src/login-common/login-settings.c index e680677b76..625312bb12 100644 --- a/src/login-common/login-settings.c +++ b/src/login-common/login-settings.c @@ -27,7 +27,6 @@ static const struct setting_define login_setting_defines[] = { DEF(STR, login_log_format), DEF(STR, login_access_sockets), DEF(STR_VARS, login_proxy_notify_path), - DEF(STR, login_plugin_dir), DEF(STR, login_plugins), DEF(TIME_MSECS, login_proxy_timeout), DEF(UINT, login_proxy_max_reconnects), @@ -56,7 +55,6 @@ static const struct login_settings login_default_settings = { .login_log_format = "%$: %s", .login_access_sockets = "", .login_proxy_notify_path = "proxy-notify", - .login_plugin_dir = MODULEDIR"/login", .login_plugins = "", .login_proxy_timeout = 30*1000, .login_proxy_max_reconnects = 3, diff --git a/src/login-common/login-settings.h b/src/login-common/login-settings.h index 5bff8377bd..0d0368a972 100644 --- a/src/login-common/login-settings.h +++ b/src/login-common/login-settings.h @@ -11,7 +11,6 @@ struct login_settings { const char *login_log_format_elements, *login_log_format; const char *login_access_sockets; const char *login_proxy_notify_path; - const char *login_plugin_dir; const char *login_plugins; unsigned int login_proxy_timeout; unsigned int login_proxy_max_reconnects; diff --git a/src/master/Makefile.am b/src/master/Makefile.am index b467d76387..9471c23bf0 100644 --- a/src/master/Makefile.am +++ b/src/master/Makefile.am @@ -69,7 +69,6 @@ test_libs = \ ../lib-settings/libsettings.la \ ../lib-test/libtest.la \ ../lib/liblib.la \ - $(MODULE_LIBS) test_deps = \ ../lib-auth/libauth.la \ diff --git a/src/master/master-settings.c b/src/master/master-settings.c index 7cfaa35a30..d6b472db93 100644 --- a/src/master/master-settings.c +++ b/src/master/master-settings.c @@ -190,8 +190,6 @@ static const struct setting_define master_setting_defines[] = { DEF(TIME, default_idle_kill), DEF(SIZE, default_vsz_limit), - DEF(BOOL, version_ignore), - DEF(UINT, first_valid_uid), DEF(UINT, last_valid_uid), DEF(UINT, first_valid_gid), @@ -218,8 +216,6 @@ static const struct master_settings master_default_settings = { .default_idle_kill = 60, .default_vsz_limit = 256*1024*1024, - .version_ignore = FALSE, - .first_valid_uid = 500, .last_valid_uid = 0, .first_valid_gid = 1, diff --git a/src/master/master-settings.h b/src/master/master-settings.h index 1096d15733..824a091631 100644 --- a/src/master/master-settings.h +++ b/src/master/master-settings.h @@ -19,8 +19,6 @@ struct master_settings { unsigned int default_idle_kill; uoff_t default_vsz_limit; - bool version_ignore; - unsigned int first_valid_uid, last_valid_uid; unsigned int first_valid_gid, last_valid_gid; diff --git a/src/master/service-process.c b/src/master/service-process.c index 34d23ff55d..dd1260d9a2 100644 --- a/src/master/service-process.c +++ b/src/master/service-process.c @@ -260,9 +260,6 @@ service_process_setup_environment(struct service *service, unsigned int uid, env_put(MY_HOSTNAME_ENV, my_hostname); env_put(MY_HOSTDOMAIN_ENV, hostdomain); - if (!service->set->master_set->version_ignore) - env_put(MASTER_DOVECOT_VERSION_ENV, PACKAGE_VERSION); - if (service_set->stats_writer_socket_path[0] == '\0') ; /* stats-writer socket disabled */ else if (service->set->chroot[0] != '\0') { diff --git a/src/plugins/fts-solr/Makefile.am b/src/plugins/fts-solr/Makefile.am index cd1e17b8b9..ab10038af1 100644 --- a/src/plugins/fts-solr/Makefile.am +++ b/src/plugins/fts-solr/Makefile.am @@ -41,7 +41,6 @@ test_libs = \ ../../lib-test/libtest.la \ ../../lib-charset/libcharset.la \ ../../lib/liblib.la \ - $(MODULE_LIBS) noinst_PROGRAMS = test-solr-response diff --git a/src/stats/Makefile.am b/src/stats/Makefile.am index 0d6f598286..59fda44552 100644 --- a/src/stats/Makefile.am +++ b/src/stats/Makefile.am @@ -98,5 +98,4 @@ LIBDOVECOT_TEST_DEPS = \ ../lib-test/libtest.la \ ../lib/liblib.la LIBDOVECOT_TEST = \ - $(LIBDOVECOT_TEST_DEPS) \ - $(MODULE_LIBS) + $(LIBDOVECOT_TEST_DEPS) diff --git a/src/submission/Makefile.am b/src/submission/Makefile.am index 6d37277ca7..c70e6c44b0 100644 --- a/src/submission/Makefile.am +++ b/src/submission/Makefile.am @@ -26,8 +26,7 @@ submission_LDFLAGS = -export-dynamic submission_LDADD = \ $(urlauth_libs) \ $(LIBDOVECOT_STORAGE) \ - $(LIBDOVECOT) \ - $(MODULE_LIBS) + $(LIBDOVECOT) submission_DEPENDENCIES = \ $(urlauth_libs) \ $(LIBDOVECOT_STORAGE_DEPS) \