[dovecot-cvs] dovecot/src/master master-settings.c,1.142,1.143

tss at dovecot.org tss at dovecot.org
Sun Nov 5 10:59:00 UTC 2006


Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv19011

Modified Files:
	master-settings.c 
Log Message:
default_mail_env fallbacking was broken with --exec-mail.



Index: master-settings.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/master-settings.c,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -d -r1.142 -r1.143
--- master-settings.c	17 Oct 2006 10:55:59 -0000	1.142
+++ master-settings.c	5 Nov 2006 10:58:57 -0000	1.143
@@ -762,9 +762,6 @@
 	}
 #endif
 
-	/* fix relative paths */
-	fix_base_path(set, &set->login_dir);
-
 	/* since base dir is under /var/run by default, it may have been
 	   deleted. */
 	if (mkdir_parents(set->base_dir, 0777) < 0 && errno != EEXIST) {
@@ -866,11 +863,19 @@
 		return FALSE;
 	}
 #endif
+	return TRUE;
+}
+
+static bool settings_fix(struct settings *set, bool nochecks)
+{
+	/* fix relative paths */
+	fix_base_path(set, &set->login_dir);
+
 	if (*set->mail_location == '\0') {
 		/* keep this for backwards compatibility */
 		set->mail_location = set->default_mail_env;
 	}
-	return TRUE;
+	return nochecks ? TRUE : settings_verify(set);
 }
 
 static struct auth_settings *
@@ -1355,13 +1360,13 @@
 		}
 		if (!settings_is_active(server->imap)) {
 			if (strcmp(server->imap->protocols, "none") == 0) {
-				if (!nochecks && !settings_verify(server->imap))
+				if (!settings_fix(server->imap, nochecks))
 					return FALSE;
 				server->defaults = server->imap;
 			}
 			server->imap = NULL;
 		} else {
-			if (!nochecks && !settings_verify(server->imap))
+			if (!settings_fix(server->imap, nochecks))
 				return FALSE;
 			server->defaults = server->imap;
 		}
@@ -1369,7 +1374,7 @@
 		if (!settings_is_active(server->pop3))
 			server->pop3 = NULL;
 		else {
-			if (!nochecks && !settings_verify(server->pop3))
+			if (!settings_fix(server->pop3, nochecks))
 				return FALSE;
 			if (server->defaults == NULL)
 				server->defaults = server->pop3;



More information about the dovecot-cvs mailing list