summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--grammar/lexer.l7
2 files changed, 16 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 166ca0a7..dffba831 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,17 @@
----------------------------------------------------------------------------
Version 7.2.6 [v7-stable] 2013-01-??
- slightly improved config parser error messages when invalid escapes happen
+- bugfix: some property-based filter were incorrectly parsed
+ This usually lead to a syntax error on startup and rsyslogd not actually
+ starting up. The problem was the regex, which did not care for double
+ quote characters to follow in the action part - unfortunately something
+ that can frequently happen with v6+ format. An example:
+ :programname, isequal, "as" {action(type="omfile" ...) }
+ Here, the part
+ :programname, isequal, "as" {action(type="omfile"
+ was treated as the property filter, and the rest as action part.
+ Obviously, this did not work out. Unfortunately, such situations usually
+ resulted in very hard to understand error messages.
----------------------------------------------------------------------------
Version 7.2.5 [v7-stable] 2013-01-08
- build system cleanup (thanks to Michael Biebl for this!)
diff --git a/grammar/lexer.l b/grammar/lexer.l
index aec05a38..e1f5a9c3 100644
--- a/grammar/lexer.l
+++ b/grammar/lexer.l
@@ -189,8 +189,11 @@ int fileno(FILE *stream);
"module"[ \n\t]*"(" { yylval.objType = CNFOBJ_MODULE;
BEGIN INOBJ; return BEGINOBJ; }
"action"[ \n\t]*"(" { BEGIN INOBJ; return BEGIN_ACTION; }
-^[ \t]*:\$?[a-z\-]+[ ]*,[ ]*!?[a-z]+[ ]*,[ ]*\".*\" {
- yylval.s = strdup(rmLeadingSpace(yytext)); return PROPFILT; }
+^[ \t]*:\$?[a-z\-]+[ ]*,[ ]*!?[a-z]+[ ]*,[ ]*\"(\\\"|[^\"])*\" {
+ yylval.s = strdup(rmLeadingSpace(yytext));
+ dbgprintf("lexer: propfilt is '%s'\n", yylval.s);
+ return PROPFILT;
+ }
^[ \t]*[\*a-z][\*a-z]*[0-7]*[\.,][,!=;\.\*a-z0-7]+ { yylval.s = strdup(rmLeadingSpace(yytext)); return PRIFILT; }
"~" |
"*" |