dovecot-2.0: config: Read auth_* settings correctly that don't e...

dovecot at dovecot.org dovecot at dovecot.org
Fri Aug 28 22:25:41 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/88246989a806
changeset: 9821:88246989a806
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Aug 28 14:44:10 2009 -0400
description:
config: Read auth_* settings correctly that don't exist inside auth {}

diffstat:

1 file changed, 16 insertions(+), 15 deletions(-)
src/config/config-parser.c |   31 ++++++++++++++++---------------

diffs (43 lines):

diff -r c9a111a50579 -r 88246989a806 src/config/config-parser.c
--- a/src/config/config-parser.c	Fri Aug 28 14:42:59 2009 -0400
+++ b/src/config/config-parser.c	Fri Aug 28 14:44:10 2009 -0400
@@ -503,23 +503,24 @@ prevfile:
 
 			if (errormsg != NULL) {
 				/* file reading failed */
-			} else if (pathlen == 0 &&
-				   strncmp(str_c(str), "auth_", 5) == 0) {
-				/* verify that the setting is valid,
-				   but delay actually adding it */
-				const char *s = t_strdup(str_c(str) + 5);
-
-				str_truncate(str, 0);
-				str_printfa(str, "auth/0/%s=", key + 5);
-				if (*line != '<' || !expand_files)
-					str_append(str, line);
-				else
-					str_append_file(str, key, line+1, &errormsg);
-
-				errormsg = config_parse_line(parsers, key + 5, str_c(str), NULL);
-				array_append(&auth_defaults, &s, 1);
 			} else {
 				errormsg = config_parse_line(parsers, key, str_c(str), NULL);
+				if (errormsg != NULL && pathlen == 0 &&
+				    strncmp(str_c(str), "auth_", 5) == 0) {
+					/* verify that the setting is valid,
+					   but delay actually adding it */
+					const char *s = t_strdup(str_c(str) + 5);
+
+					str_truncate(str, 0);
+					str_printfa(str, "auth/0/%s=", key + 5);
+					if (*line != '<' || !expand_files)
+						str_append(str, line);
+					else
+						str_append_file(str, key, line+1, &errormsg);
+
+					errormsg = config_parse_line(parsers, key + 5, str_c(str), NULL);
+					array_append(&auth_defaults, &s, 1);
+				}
 			}
 		} else if (strcmp(key, "}") != 0 || *line != '\0') {
 			/* b) + errors */


More information about the dovecot-cvs mailing list