3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/servers/mail/dovecot/2.2.x-module_dir.patch

136 lines
5.1 KiB
Diff
Raw Normal View History

2016-05-02 21:20:52 +01:00
diff --git a/src/auth/main.c b/src/auth/main.c
2019-07-25 13:32:50 +01:00
index 2dbf9e1..b1e778a 100644
2016-05-02 21:20:52 +01:00
--- a/src/auth/main.c
+++ b/src/auth/main.c
2019-07-25 13:32:50 +01:00
@@ -192,7 +192,7 @@ static void main_preinit(void)
mod_set.debug = global_auth_settings->debug;
mod_set.filter_callback = auth_module_filter;
- modules = module_dir_load(AUTH_MODULE_DIR, NULL, &mod_set);
2016-01-09 13:37:28 +00:00
+ modules = module_dir_load("/etc/dovecot/modules/auth", NULL, &mod_set);
module_dir_init(modules);
if (!worker)
2019-07-25 13:32:50 +01:00
@@ -223,7 +223,7 @@ void auth_module_load(const char *names)
mod_set.debug = global_auth_settings->debug;
mod_set.ignore_missing = TRUE;
- modules = module_dir_load_missing(modules, AUTH_MODULE_DIR, names,
2016-01-09 13:37:28 +00:00
+ modules = module_dir_load_missing(modules, "/etc/dovecot/modules/auth", names,
&mod_set);
module_dir_init(modules);
}
2016-05-02 21:20:52 +01:00
diff --git a/src/config/all-settings.c b/src/config/all-settings.c
2019-07-25 13:32:50 +01:00
index 4a2ab53..5057d63 100644
2016-05-02 21:20:52 +01:00
--- a/src/config/all-settings.c
+++ b/src/config/all-settings.c
2019-07-25 13:32:50 +01:00
@@ -1079,7 +1079,7 @@ static const struct mail_user_settings mail_user_default_settings = {
.last_valid_gid = 0,
.mail_plugins = "",
- .mail_plugin_dir = MODULEDIR,
2016-01-09 13:37:28 +00:00
+ .mail_plugin_dir = "/etc/dovecot/modules",
2019-07-25 13:32:50 +01:00
.mail_log_prefix = "%s(%u)<%{pid}><%{session}>: ",
2019-07-25 13:32:50 +01:00
@@ -4723,7 +4723,7 @@ const struct doveadm_settings doveadm_default_settings = {
.base_dir = PKG_RUNDIR,
.libexec_dir = PKG_LIBEXECDIR,
.mail_plugins = "",
- .mail_plugin_dir = MODULEDIR,
2016-01-09 13:37:28 +00:00
+ .mail_plugin_dir = "/etc/dovecot/modules",
2016-05-02 21:20:52 +01:00
.auth_debug = FALSE,
2014-03-14 09:34:21 +00:00
.auth_socket_path = "auth-userdb",
.doveadm_socket_path = "doveadm-server",
2016-05-02 21:20:52 +01:00
diff --git a/src/config/config-parser.c b/src/config/config-parser.c
2019-07-25 13:32:50 +01:00
index 6894123..07e9fec 100644
2016-05-02 21:20:52 +01:00
--- a/src/config/config-parser.c
+++ b/src/config/config-parser.c
2019-07-25 13:32:50 +01:00
@@ -1077,7 +1077,7 @@ void config_parse_load_modules(void)
2019-07-25 13:32:50 +01:00
i_zero(&mod_set);
mod_set.abi_version = DOVECOT_ABI_VERSION;
- modules = module_dir_load(CONFIG_MODULE_DIR, NULL, &mod_set);
2016-01-09 13:37:28 +00:00
+ modules = module_dir_load("/etc/dovecot/modules/settings", NULL, &mod_set);
module_dir_init(modules);
i_array_init(&new_roots, 64);
2016-05-02 21:20:52 +01:00
diff --git a/src/dict/main.c b/src/dict/main.c
2019-07-25 13:32:50 +01:00
index 722ed02..4ed12ae 100644
2016-05-02 21:20:52 +01:00
--- a/src/dict/main.c
+++ b/src/dict/main.c
2019-07-25 13:32:50 +01:00
@@ -104,7 +104,7 @@ static void main_init(void)
mod_set.abi_version = DOVECOT_ABI_VERSION;
mod_set.require_init_funcs = TRUE;
- modules = module_dir_load(DICT_MODULE_DIR, NULL, &mod_set);
2016-01-09 13:37:28 +00:00
+ modules = module_dir_load("/etc/dovecot/modules/dict", NULL, &mod_set);
module_dir_init(modules);
/* Register only after loading modules. They may contain SQL drivers,
2016-05-02 21:20:52 +01:00
diff --git a/src/doveadm/doveadm-settings.c b/src/doveadm/doveadm-settings.c
2019-07-25 13:32:50 +01:00
index 88da40c..141ed05 100644
2016-05-02 21:20:52 +01:00
--- a/src/doveadm/doveadm-settings.c
+++ b/src/doveadm/doveadm-settings.c
2019-07-25 13:32:50 +01:00
@@ -86,7 +86,7 @@ const struct doveadm_settings doveadm_default_settings = {
.base_dir = PKG_RUNDIR,
.libexec_dir = PKG_LIBEXECDIR,
.mail_plugins = "",
- .mail_plugin_dir = MODULEDIR,
2016-01-09 13:37:28 +00:00
+ .mail_plugin_dir = "/etc/dovecot/modules",
2016-05-02 21:20:52 +01:00
.auth_debug = FALSE,
2014-03-14 09:34:21 +00:00
.auth_socket_path = "auth-userdb",
.doveadm_socket_path = "doveadm-server",
2016-05-02 21:20:52 +01:00
diff --git a/src/lib-fs/fs-api.c b/src/lib-fs/fs-api.c
2019-07-25 13:32:50 +01:00
index a939f61..846cf86 100644
2016-05-02 21:20:52 +01:00
--- a/src/lib-fs/fs-api.c
+++ b/src/lib-fs/fs-api.c
@@ -114,7 +114,7 @@ static void fs_class_try_load_plugin(const char *driver)
mod_set.abi_version = DOVECOT_ABI_VERSION;
mod_set.ignore_missing = TRUE;
- fs_modules = module_dir_load_missing(fs_modules, MODULE_DIR,
2016-01-09 13:37:28 +00:00
+ fs_modules = module_dir_load_missing(fs_modules, "/etc/dovecot/modules",
module_name, &mod_set);
module_dir_init(fs_modules);
2016-05-02 21:20:52 +01:00
diff --git a/src/lib-ssl-iostream/iostream-ssl.c b/src/lib-ssl-iostream/iostream-ssl.c
2019-07-25 13:32:50 +01:00
index f857ec9..0d1023b 100644
2016-05-02 21:20:52 +01:00
--- a/src/lib-ssl-iostream/iostream-ssl.c
+++ b/src/lib-ssl-iostream/iostream-ssl.c
2019-07-25 13:32:50 +01:00
@@ -53,7 +53,7 @@ int ssl_module_load(const char **error_r)
mod_set.abi_version = DOVECOT_ABI_VERSION;
mod_set.setting_name = "<built-in lib-ssl-iostream lookup>";
2016-12-28 14:04:41 +00:00
mod_set.require_init_funcs = TRUE;
- ssl_module = module_dir_load(MODULE_DIR, plugin_name, &mod_set);
2016-01-09 13:37:28 +00:00
+ ssl_module = module_dir_load("/etc/dovecot/modules", plugin_name, &mod_set);
2016-12-28 14:04:41 +00:00
if (module_dir_try_load_missing(&ssl_module, MODULE_DIR, plugin_name,
&mod_set, error_r) < 0)
return -1;
2016-05-02 21:20:52 +01:00
diff --git a/src/lib-storage/mail-storage-settings.c b/src/lib-storage/mail-storage-settings.c
2019-07-25 13:32:50 +01:00
index b314b52..7055094 100644
2016-05-02 21:20:52 +01:00
--- a/src/lib-storage/mail-storage-settings.c
+++ b/src/lib-storage/mail-storage-settings.c
2019-07-25 13:32:50 +01:00
@@ -337,7 +337,7 @@ static const struct mail_user_settings mail_user_default_settings = {
.last_valid_gid = 0,
.mail_plugins = "",
- .mail_plugin_dir = MODULEDIR,
2016-01-09 13:37:28 +00:00
+ .mail_plugin_dir = "/etc/dovecot/modules",
2019-07-25 13:32:50 +01:00
.mail_log_prefix = "%s(%u)<%{pid}><%{session}>: ",
2019-07-25 13:32:50 +01:00
diff --git a/src/lmtp/lmtp-settings.c b/src/lmtp/lmtp-settings.c
index 1666ec9..8a27200 100644
--- a/src/lmtp/lmtp-settings.c
+++ b/src/lmtp/lmtp-settings.c
@@ -89,7 +89,7 @@ static const struct lmtp_settings lmtp_default_settings = {
.login_trusted_networks = "",
.mail_plugins = "",
- .mail_plugin_dir = MODULEDIR,
+ .mail_plugin_dir = "/etc/dovecot/modules",
};
static const struct setting_parser_info *lmtp_setting_dependencies[] = {