[dovecot-cvs] dovecot/src/master master-settings.c, 1.125.2.15, 1.125.2.16
tss at dovecot.org
tss at dovecot.org
Sun Nov 5 10:58:58 UTC 2006
Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv18984
Modified Files:
Tag: branch_1_0
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.125.2.15
retrieving revision 1.125.2.16
diff -u -d -r1.125.2.15 -r1.125.2.16
--- master-settings.c 17 Oct 2006 10:55:51 -0000 1.125.2.15
+++ master-settings.c 5 Nov 2006 10:58:55 -0000 1.125.2.16
@@ -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 *
@@ -1357,13 +1362,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;
}
@@ -1371,7 +1376,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