From 6b8b7ba0091a4e59b9a45057756fc7f754576242 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 22 Jul 2011 11:58:39 +0200 Subject: need to handle legacy-legacy omusrmsg format stricter otherwise, the grammar for if-constructs was broken --- doc/v6compatibility.html | 38 ++++++++++++++++++++++++++++++++++++-- grammar/lexer.l | 2 +- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/doc/v6compatibility.html b/doc/v6compatibility.html index 67f7f0d8..cf621943 100644 --- a/doc/v6compatibility.html +++ b/doc/v6compatibility.html @@ -82,8 +82,7 @@ syntax is concerned. Nevertheless, v6 still supports it, but a new syntax is req for the action. Let's assume your outchannel is named "channel". The previous syntax was
*.* $channel - -
+ This was deprecated in v5 and no longer works in v6. Instead, you need to specify
*.* :omfile:$channel @@ -92,6 +91,41 @@ Note that this syntax is available starting with rsyslog v4. It is important to mind that future versions of rsyslog will require different syntax and/or drop outchannel support completely. So if at all possible, avoid using this feature. If you must use it, be prepared for future changes and watch announcements very carefully. +

omusrmsg

+

The omusrmsg module is used to send messages to users. In legacy-legacy +config format (that is the very old sysklogd style), it was suffucient to use +just the user name to call this action, like in this example: +

+*.* rgerhards +
+This format is very ambigious and causes headache (see +blog post +on omusrmsg for details). Thus the format has been superseded by this syntax +(which is legacy format ;-)): +
+*.* :omusrmsg:rgerhards +
+That syntax is supported since later subversions of version 4. +

Rsyslog v6 still supports the legacy-legacy format, but in a very strict +sense. For example, if multiple users or templates are given, no spaces +must be included in the action line. For example, this works up to v5, but no +longer in v6: +

+*.* rgerhards, bgerhards +
+To fix it in a way that is compatible with pre-v6, use (note the removed space!): +
+*.* rgerhards,bgerhards +
+Of course, it probably is better to understand in native v6 format: +
+*.* action(type="omusrmsg" users="rgerhards, bgerhards") +
+As you see, here you may include spaces between user names. +

In the long term, legacy-legacy format will most probably totally disappear, +so it is a wise decision to change config files at least to the legacy +format (with ":omusrmsg:" in front of the name). +

[manual index] [rsyslog site]

This documentation is part of the rsyslog project.
diff --git a/grammar/lexer.l b/grammar/lexer.l index a89cf180..cf912db3 100644 --- a/grammar/lexer.l +++ b/grammar/lexer.l @@ -165,7 +165,7 @@ int fileno(FILE *stream); \/[^*][^\n]* | :[a-z0-9]+:[^\n]* | [\|\.\-\@\^?~>][^\n]+ | -[a-z0-9_][a-z0-9_\-\+,; ]* { yylval.s = strdup(yytext); +[a-z0-9_][a-z0-9_\-\+,;]* { yylval.s = strdup(yytext); // printf("lex: LEGA ACT: '%s'\n", yytext); return LEGACY_ACTION; } ")" { BEGIN INITIAL; return ENDOBJ; } -- cgit v1.2.3