changeset 6190:141c3abcac56 HEAD

If version_ignore=yes, ignore plugin versions also.
author Timo Sirainen <tss@iki.fi>
date Mon, 06 Aug 2007 23:47:37 +0300
parents 968430741daf
children 6793d8d934a8
files src/auth/main.c
diffstat 1 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- 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 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 @@
 	   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)
 {
 	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;