]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
config: Read auth_* settings correctly that don't exist inside auth {}
authorTimo Sirainen <tss@iki.fi>
Fri, 28 Aug 2009 18:44:10 +0000 (14:44 -0400)
committerTimo Sirainen <tss@iki.fi>
Fri, 28 Aug 2009 18:44:10 +0000 (14:44 -0400)
--HG--
branch : HEAD

src/config/config-parser.c

index 32a903a0e66da8d2235999bc07cac3926d2f961d..d4c4266d49620a5b889894cee51b0e021a5dd157 100644 (file)
@@ -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 */