dovecot-1.2: If some setting contains a bad value, make sure the...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Jan 27 02:18:00 EET 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/77c67307d316
changeset: 8692:77c67307d316
user: Timo Sirainen <tss at iki.fi>
date: Mon Jan 26 19:17:54 2009 -0500
description:
If some setting contains a bad value, make sure the error message contains the setting name.
diffstat:
1 file changed, 16 insertions(+), 13 deletions(-)
src/master/master-settings.c | 29 ++++++++++++++++-------------
diffs (108 lines):
diff -r 81a146c34a5c -r 77c67307d316 src/master/master-settings.c
--- a/src/master/master-settings.c Mon Jan 26 16:21:30 2009 -0500
+++ b/src/master/master-settings.c Mon Jan 26 19:17:54 2009 -0500
@@ -457,7 +457,7 @@ static bool auth_settings_verify(struct
auth->gid = pw->pw_gid;
if (access(t_strcut(auth->executable, ' '), X_OK) < 0) {
- i_error("Can't use auth executable %s: %m",
+ i_error("auth_executable: Can't use %s: %m",
t_strcut(auth->executable, ' '));
return FALSE;
}
@@ -803,7 +803,7 @@ static bool settings_verify(struct setti
if (set->protocol != MAIL_PROTOCOL_ANY &&
access(t_strcut(set->mail_executable, ' '), X_OK) < 0) {
- i_error("Can't use mail executable %s: %m",
+ i_error("mail_executable: Can't use %s: %m",
t_strcut(set->mail_executable, ' '));
return FALSE;
}
@@ -811,7 +811,8 @@ static bool settings_verify(struct setti
if (*set->log_path != '\0' && access(set->log_path, W_OK) < 0) {
dir = get_directory(set->log_path);
if (access(dir, W_OK) < 0) {
- i_error("Can't write to log directory %s: %m", dir);
+ i_error("log_path: Can't write to directory %s: %m",
+ dir);
return FALSE;
}
}
@@ -820,14 +821,15 @@ static bool settings_verify(struct setti
access(set->info_log_path, W_OK) < 0) {
dir = get_directory(set->info_log_path);
if (access(dir, W_OK) < 0) {
- i_error("Can't write to info log directory %s: %m",
+ i_error("info_log_path: Can't write to directory %s: %m",
dir);
return FALSE;
}
}
if (!syslog_facility_find(set->syslog_facility, &facility)) {
- i_error("Unknown syslog_facility '%s'", set->syslog_facility);
+ i_error("syslog_facility: Unknown value: %s",
+ set->syslog_facility);
return FALSE;
}
@@ -841,18 +843,18 @@ static bool settings_verify(struct setti
if (strcmp(set->ssl, "no") != 0) {
if (*set->ssl_ca_file != '\0' &&
access(set->ssl_ca_file, R_OK) < 0) {
- i_fatal("Can't use SSL CA file %s: %m",
+ i_fatal("ssl_ca_file: Can't use %s: %m",
set->ssl_ca_file);
}
if (access(set->ssl_cert_file, R_OK) < 0) {
- i_error("Can't use SSL certificate %s: %m",
+ i_error("ssl_cert_file: Can't use %s: %m",
set->ssl_cert_file);
return FALSE;
}
if (access(set->ssl_key_file, R_OK) < 0) {
- i_error("Can't use SSL key file %s: %m",
+ i_error("ssl_key_file: Can't use %s: %m",
set->ssl_key_file);
return FALSE;
}
@@ -895,7 +897,7 @@ static bool settings_verify(struct setti
if (set->protocol != MAIL_PROTOCOL_ANY &&
access(t_strcut(set->login_executable, ' '), X_OK) < 0) {
- i_error("Can't use login executable %s: %m",
+ i_error("login_executable: Can't use %s: %m",
t_strcut(set->login_executable, ' '));
return FALSE;
}
@@ -921,14 +923,14 @@ static bool settings_verify(struct setti
#ifdef HAVE_MODULES
if (*set->mail_plugins != '\0' &&
access(set->mail_plugin_dir, R_OK | X_OK) < 0) {
- i_error("Can't access mail module directory: %s: %m",
+ i_error("mail_plugin_dir: Can't access directory: %s: %m",
set->mail_plugin_dir);
return FALSE;
}
#else
if (*set->mail_plugins != '\0') {
- i_error("Module support wasn't built into Dovecot, "
- "can't load modules: %s", set->mail_plugins);
+ i_error("mail_plugins: Plugin support wasn't built into Dovecot, "
+ "can't load plugins: %s", set->mail_plugins);
return FALSE;
}
#endif
@@ -1537,7 +1539,8 @@ bool master_settings_read(const char *pa
for (server = ctx.root; server != NULL; server = server->next) {
if ((*server->imap->protocols == '\0' ||
*server->pop3->protocols == '\0') && !nochecks) {
- i_error("No protocols given in configuration file");
+ i_error("protocols: No protocols given "
+ "in configuration file");
return FALSE;
}
/* --exec-mail is used if nochecks=TRUE. Allow it regardless
More information about the dovecot-cvs
mailing list