From: Timo Sirainen Date: Fri, 28 Aug 2009 18:44:10 +0000 (-0400) Subject: config: Read auth_* settings correctly that don't exist inside auth {} X-Git-Tag: 2.0.alpha1~231 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0bd99708e5aef294a948c864eb1ba8198b023673;p=thirdparty%2Fdovecot%2Fcore.git config: Read auth_* settings correctly that don't exist inside auth {} --HG-- branch : HEAD --- diff --git a/src/config/config-parser.c b/src/config/config-parser.c index 32a903a0e6..d4c4266d49 100644 --- a/src/config/config-parser.c +++ b/src/config/config-parser.c @@ -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 */