summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-03-13 15:45:29 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-03-13 15:45:29 +0100
commit4c4ca32b6bab140015b8eb1d0386aad4bcc8591a (patch)
tree357c5262fc46cc3aeb1135db9cbd0382df005712
parenta25a4bc02e2a6e9915677600401ef927f9b58013 (diff)
parent462426844d188e21a402cda78dc33c100e1b394d (diff)
downloadrsyslog-4c4ca32b6bab140015b8eb1d0386aad4bcc8591a.tar.gz
rsyslog-4c4ca32b6bab140015b8eb1d0386aad4bcc8591a.tar.bz2
rsyslog-4c4ca32b6bab140015b8eb1d0386aad4bcc8591a.zip
Merge branch 'v7-stable'
Conflicts: configure.ac doc/manual.html
-rw-r--r--ChangeLog24
-rw-r--r--doc/rsyslog_conf_basic_structure.html11
-rw-r--r--grammar/lexer.l8
-rw-r--r--grammar/rainerscript.c9
-rw-r--r--tools/rsyslog.conf.52
5 files changed, 48 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index c8ef7ac6..20599500 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,14 @@
---------------------------------------------------------------------------
+Version 7.3.8 [devel] 2013-03-??
+- bugfix: include files got included in the wrong order
+ closes: http://bugzilla.adiscon.com/show_bug.cgi?id=411
+ This happens if an $IncludeConfig directive was done on multiple
+ files (e.g. the distro default of $IncludeConfig /etc/rsyslog.d/*.conf).
+ In that case, the order of include file processing is reversed, which
+ could lead to all sorts of problems.
+ Thanks to Nathan Stratton Treadway for his great analysis of the problem,
+ which made bug fixing really easy.
+---------------------------------------------------------------------------
Version 7.3.7 [devel] 2013-03-12
- add support for anonymizing IPv4 addresses
- add support for writing to the Linux Journal (omjournal)
@@ -158,8 +168,20 @@ Version 7.3.0 [devel] 2012-10-09
This was achieved by somewhat reducing the robustness of the zip archive.
This is controlled by the new action parameter "VeryReliableZip".
----------------------------------------------------------------------------
-Version 7.2.6 [v7-stable] 2013-01-??
+Version 7.2.7 [v7-stable] 2013-03-??
+- doc bugfix: rsyslog.conf man page had invalid file format info
+ closes: http://bugzilla.adiscon.com/show_bug.cgi?id=418
+----------------------------------------------------------------------------
+Version 7.2.6 [v7-stable] 2013-03-05
- slightly improved config parser error messages when invalid escapes happen
+- bugfix: include files got included in the wrong order
+ closes: http://bugzilla.adiscon.com/show_bug.cgi?id=411
+ This happens if an $IncludeConfig directive was done on multiple
+ files (e.g. the distro default of $IncludeConfig /etc/rsyslog.d/*.conf).
+ In that case, the order of include file processing is reversed, which
+ could lead to all sorts of problems.
+ Thanks to Nathan Stratton Treadway for his great analysis of the problem,
+ which made bug fixing really easy.
- bugfix: omelasticsearch failed when authentication data was provided
... at least in most cases it emitted an error message:
"snprintf failed when trying to build auth string"
diff --git a/doc/rsyslog_conf_basic_structure.html b/doc/rsyslog_conf_basic_structure.html
index fad1b110..00a700d4 100644
--- a/doc/rsyslog_conf_basic_structure.html
+++ b/doc/rsyslog_conf_basic_structure.html
@@ -49,7 +49,8 @@ after the stop statement are never evaluated.
<h3>Data Manipulation Statements</h3>
<ul>
-<li><b>set</b> - sets a user variable
+<li><b>set</b> - <a href="http://www.rsyslog.com/how-to-set-variables-in-rsyslog-v7/">sets</a>
+a user variable
<li><b>unset</b> - deletes a previously set user variable
</ul>
@@ -80,6 +81,14 @@ a message comes in via that input, the "program" (ruleset) bound to it will be e
(but not any other!).
<p>There is detail documentation available for
<a href="multi_ruleset">rsyslog rulesets</a>.
+<p>For quick reference, rulesets are defined as follows:
+<pre>
+ruleset(name="rulesetname") {
+ action(type="omfile" file="/path/to/file")
+ action(type="..." ...)
+ /* and so on... */
+}
+</pre>
<p>[<a href="manual.html">manual index</a>]
[<a href="rsyslog_conf.html">rsyslog.conf</a>]
diff --git a/grammar/lexer.l b/grammar/lexer.l
index e1f5a9c3..237eb2a6 100644
--- a/grammar/lexer.l
+++ b/grammar/lexer.l
@@ -310,6 +310,7 @@ cnfSetLexFile(char *fname)
currbs = bs;
cnfcurrfn = bs->fn;
yylineno = 1;
+ dbgprintf("config parser: pushed file %s on top of stack\n", fname);
done:
if(r != 0) {
@@ -337,6 +338,7 @@ popfile(void)
* necessary, as otherwise we may provide wrong file name information
* at the end of include files as well. -- rgerhards, 2011-07-22
*/
+ dbgprintf("config parser: reached end of file %s\n", bs->fn);
yy_delete_buffer(bs->bs);
if(bs->prev != NULL)
free(bs->fn);
@@ -346,12 +348,16 @@ popfile(void)
currbs = bs->prev;
free(bs);
- if(currbs == NULL)
+ if(currbs == NULL) {
+ dbgprintf("config parser: parsing completed\n");
return 1; /* all processed */
+ }
yy_switch_to_buffer(currbs->bs);
yylineno = currbs->lineno;
cnfcurrfn = currbs->fn;
+ dbgprintf("config parser: resume parsing of file %s at line %d\n",
+ cnfcurrfn, yylineno);
return 0;
}
diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c
index 6dbdad63..7ef7bf7f 100644
--- a/grammar/rainerscript.c
+++ b/grammar/rainerscript.c
@@ -3233,7 +3233,7 @@ cnfDoInclude(char *name)
{
char *cfgFile;
char *finalName;
- unsigned i;
+ int i;
int result;
glob_t cfgFiles;
struct stat fileInfo;
@@ -3269,7 +3269,12 @@ cnfDoInclude(char *name)
return 1;
}
- for(i = 0; i < cfgFiles.gl_pathc; i++) {
+ /* note: bison "stacks" the files, so we need to submit them
+ * in reverse order to the *stack* in order to get the proper
+ * parsing order. Also see
+ * http://bugzilla.adiscon.com/show_bug.cgi?id=411
+ */
+ for(i = cfgFiles.gl_pathc - 1; i >= 0 ; i--) {
cfgFile = cfgFiles.gl_pathv[i];
if(stat(cfgFile, &fileInfo) != 0) {
char errStr[1024];
diff --git a/tools/rsyslog.conf.5 b/tools/rsyslog.conf.5
index fe9e083b..07da6ffd 100644
--- a/tools/rsyslog.conf.5
+++ b/tools/rsyslog.conf.5
@@ -218,7 +218,7 @@ beginning with a slash ('/').
.B Example:
.RS
-*.* /var/log/traditionalfile.log;RSYSLOG_TraditionalFormat # log to a file in the traditional format
+*.* /var/log/traditionalfile.log;RSYSLOG_TraditionalFileFormat # log to a file in the traditional format
.RE
Note: if you would like to use high-precision timestamps in your log files,