dovecot: If version_ignore=yes, ignore plugin versions also.

dovecot at dovecot.org dovecot at dovecot.org
Mon Aug 6 23:47:42 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/141c3abcac56
changeset: 6190:141c3abcac56
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Aug 06 23:47:37 2007 +0300
description:
If version_ignore=yes, ignore plugin versions also.

diffstat:

1 file changed, 10 insertions(+), 9 deletions(-)
src/auth/main.c |   19 ++++++++++---------

diffs (43 lines):

diff -r 968430741daf -r 141c3abcac56 src/auth/main.c
--- a/src/auth/main.c	Mon Aug 06 23:43:28 2007 +0300
+++ b/src/auth/main.c	Mon Aug 06 23:47:37 2007 +0300
@@ -183,6 +183,15 @@ static void add_extra_listeners(void)
 
 static void drop_privileges(void)
 {
+	const char *version;
+
+	version = getenv("DOVECOT_VERSION");
+	if (version != NULL && strcmp(version, PACKAGE_VERSION) != 0) {
+		i_fatal("Dovecot version mismatch: "
+			"Master is v%s, dovecot-auth is v"PACKAGE_VERSION" "
+			"(if you don't care, set version_ignore=yes)", version);
+	}
+
 	open_logfile();
 
 	/* Open /dev/urandom before chrooting */
@@ -196,7 +205,7 @@ static void drop_privileges(void)
 	   only by root. Also load all modules here. */
 	passdbs_init();
 	userdbs_init();
-	modules = module_dir_load(AUTH_MODULE_DIR, NULL, TRUE, PACKAGE_VERSION);
+	modules = module_dir_load(AUTH_MODULE_DIR, NULL, TRUE, version);
 	auth = auth_preinit();
 
 	auth_master_listeners_init();
@@ -210,14 +219,6 @@ static void main_init(bool nodaemon)
 static void main_init(bool nodaemon)
 {
 	struct auth_master_listener *listener;
-	const char *value;
-
-	value = getenv("DOVECOT_VERSION");
-	if (value != NULL && strcmp(value, PACKAGE_VERSION) != 0) {
-		i_fatal("Dovecot version mismatch: "
-			"Master is v%s, dovecot-auth is v"PACKAGE_VERSION" "
-			"(if you don't care, set version_ignore=yes)", value);
-	}
 
         process_start_time = ioloop_time;
 


More information about the dovecot-cvs mailing list