summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2013-07-06 00:13:30 +0200
committerMichael Biebl <biebl@debian.org>2013-07-06 00:13:30 +0200
commite7b9dd6a5138cf317310ad5273aaa3e7bc7ea344 (patch)
tree09364f167f08baf8bced5335d2777dbbd261d8d2
parent29e197d0cf195bda0c7cdf599381373185904bd6 (diff)
parentf5638ea86a8626b7e0e471d720359cb4e3d8cb1c (diff)
downloadrsyslog-e7b9dd6a5138cf317310ad5273aaa3e7bc7ea344.tar.gz
Merge tag 'upstream/7.4.2'
Upstream version 7.4.2
-rw-r--r--ChangeLog31
-rw-r--r--Makefile.am1
-rw-r--r--Makefile.in1
-rwxr-xr-xconfigure22
-rw-r--r--configure.ac4
-rw-r--r--doc/imfile.html6
-rw-r--r--doc/imjournal.html2
-rw-r--r--doc/imptcp.html14
-rw-r--r--doc/imudp.html4
-rw-r--r--doc/manual.html2
-rw-r--r--doc/multi_ruleset.html2
-rw-r--r--doc/multi_ruleset_legacy_format.html2
-rw-r--r--doc/omfile.html72
-rw-r--r--doc/rsconf1_rulesetcreatemainqueue.html2
-rw-r--r--grammar/rainerscript.c11
-rw-r--r--plugins/imfile/imfile.c4
-rw-r--r--plugins/impstats/impstats.c4
-rw-r--r--plugins/imptcp/imptcp.c5
-rw-r--r--plugins/imtcp/imtcp.c4
-rw-r--r--plugins/imudp/imudp.c8
-rw-r--r--plugins/omelasticsearch/omelasticsearch.c1
-rw-r--r--plugins/omrelp/omrelp.c5
-rw-r--r--runtime/lmsig_gt.c10
-rw-r--r--runtime/msg.c30
-rw-r--r--runtime/net.c1
-rw-r--r--runtime/stream.c1
-rw-r--r--runtime/strmsrv.h2
-rw-r--r--runtime/typedefs.h13
-rw-r--r--tcpsrv.h4
-rwxr-xr-xtests/diag.sh1
30 files changed, 172 insertions, 97 deletions
diff --git a/ChangeLog b/ChangeLog
index 8250a92..d02a218 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,35 @@
---------------------------------------------------------------------------
+Version 7.4.2 [v7.4-stable] 2013-07-04
+- bugfix: in RFC5425 TLS, multiple wildcards in auth could cause segfault
+- bugfix: RainerScript object required parameters were not properly
+ checked - this clould result to segfaults on startup if parameters
+ were missing.
+- bugfix: double-free in omelasticsearch
+ closes: http://bugzilla.adiscon.com/show_bug.cgi?id=461
+ a security advisory for this bug is available at:
+ http://www.lsexperts.de/advisories/lse-2013-07-03.txt
+ PLEASE NOTE: This issue only existed if omelasticsearch was used
+ in a non-default configuration, where the "errorfile" parameter
+ was specified. Without that parameter set, the bug could not
+ be triggered.
+ Thanks to Markus Vervier and Marius Ionescu for providing a detailled
+ bug report. Special thanks to Markus for coordinating his security
+ advisory with us.
+- bugfix: omrelp potential segfault at startup on invalid config parameters
+- bugfix: small memory leak when $uptime property was used
+- bugfix: potential segfault on rsyslog termination in imudp
+ closes: http://bugzilla.adiscon.com/show_bug.cgi?id=456
+- bugfix: lmsig_gt abort on invalid configuration parameters
+ closes: http://bugzilla.adiscon.com/show_bug.cgi?id=448
+ Thanks to Risto Laanoja for the patch.
+- imtcp: fix typo in "listner" parameter, which is "listener"
+ Currently, both names are accepted.
+- solved build problems on FreeBSD
+ closes: http://bugzilla.adiscon.com/show_bug.cgi?id=457
+ closes: http://bugzilla.adiscon.com/show_bug.cgi?id=458
+ Thanks to Christiano for reproting and suggesting patches
+- solved build problems on CENTOS5
+---------------------------------------------------------------------------
Version 7.4.1 [v7.4-stable] 2013-06-17
- imjournal: add ratelimiting capability
The original imjournal code did not support ratelimiting at all. We
diff --git a/Makefile.am b/Makefile.am
index ed3b54b..567b876 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -286,6 +286,7 @@ DISTCHECK_CONFIGURE_FLAGS= --enable-gssapi_krb5 \
--enable-pmsnare \
--enable-mmsnmptrapd \
--enable-elasticsearch \
+ --enable-valgrind \
--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
# temporarily disable these checks for make distcheck 2012-09-06 rgerhards
# --enable-extended-tests \
diff --git a/Makefile.in b/Makefile.in
index 9577fea..9232c11 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -599,6 +599,7 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-gssapi_krb5 \
--enable-pmsnare \
--enable-mmsnmptrapd \
--enable-elasticsearch \
+ --enable-valgrind \
--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
all: config.h
diff --git a/configure b/configure
index 4f78940..8b9ef3d 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for rsyslog 7.4.1.
+# Generated by GNU Autoconf 2.69 for rsyslog 7.4.2.
#
# Report bugs to <rsyslog@lists.adiscon.com>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='rsyslog'
PACKAGE_TARNAME='rsyslog'
-PACKAGE_VERSION='7.4.1'
-PACKAGE_STRING='rsyslog 7.4.1'
+PACKAGE_VERSION='7.4.2'
+PACKAGE_STRING='rsyslog 7.4.2'
PACKAGE_BUGREPORT='rsyslog@lists.adiscon.com'
PACKAGE_URL=''
@@ -1612,7 +1612,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures rsyslog 7.4.1 to adapt to many kinds of systems.
+\`configure' configures rsyslog 7.4.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1682,7 +1682,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of rsyslog 7.4.1:";;
+ short | recursive ) echo "Configuration of rsyslog 7.4.2:";;
esac
cat <<\_ACEOF
@@ -1929,7 +1929,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-rsyslog configure 7.4.1
+rsyslog configure 7.4.2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2509,7 +2509,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by rsyslog $as_me 7.4.1, which was
+It was created by rsyslog $as_me 7.4.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3333,7 +3333,7 @@ fi
# Define the identity of the package.
PACKAGE='rsyslog'
- VERSION='7.4.1'
+ VERSION='7.4.2'
cat >>confdefs.h <<_ACEOF
@@ -18422,7 +18422,7 @@ fi
if test "x$enable_cached_man_pages" = "xno"; then
# obtain path for rst2man
if test "x$enable_libgcrypt" = "xyes" || \
- "x$enable_guardtime" = "xyes"; then
+ test "x$enable_guardtime" = "xyes"; then
# Extract the first word of "rst2man", so it can be a program name with args.
set dummy rst2man; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -20624,7 +20624,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by rsyslog $as_me 7.4.1, which was
+This file was extended by rsyslog $as_me 7.4.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -20690,7 +20690,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-rsyslog config.status 7.4.1
+rsyslog config.status 7.4.2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index bb0de0c..db324c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
-AC_INIT([rsyslog],[7.4.1],[rsyslog@lists.adiscon.com])
+AC_INIT([rsyslog],[7.4.2],[rsyslog@lists.adiscon.com])
AM_INIT_AUTOMAKE
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -1008,7 +1008,7 @@ AC_ARG_ENABLE(cached_man_pages,
if test "x$enable_cached_man_pages" = "xno"; then
# obtain path for rst2man
if test "x$enable_libgcrypt" = "xyes" || \
- "x$enable_guardtime" = "xyes"; then
+ test "x$enable_guardtime" = "xyes"; then
AC_PATH_PROG([RST2MAN], [rst2man])
if test "x${RST2MAN}" == "x"; then
AC_MSG_FAILURE([rst2man not found in PATH])
diff --git a/doc/imfile.html b/doc/imfile.html
index 274d6e6..dd62c86 100644
--- a/doc/imfile.html
+++ b/doc/imfile.html
@@ -14,7 +14,7 @@ a syslog message. A standard
text file is a file consisting of printable characters with lines
being&nbsp;delimited by LF.</p>
<p>The file is read line-by-line and any line read is passed to
-rsyslog's rule engine. The rule engine applies filter conditons and
+rsyslog's rule engine. The rule engine applies filter conditions and
selects which actions needs to be carried out. Empty lines are <b>not</b>
processed, as they would result in empty syslog records. They are simply
ignored.</p>
@@ -49,9 +49,9 @@ releases of imfile may support per-file polling intervals, but
currently this is not the case. If multiple PollingInterval
statements are present in rsyslog.conf, only the last one is used.<br>
A short poll interval provides more rapid message forwarding, but
-requires more system ressources. While it is possible, we stongly
+requires more system resources. While it is possible, we stongly
recommend not to set the polling interval to 0 seconds. That will make
-rsyslogd become a CPU hog, taking up considerable ressources. It is
+rsyslogd become a CPU hog, taking up considerable resources. It is
supported, however, for the few very unusual situations where this
level may be needed. Even if you need quick response, 1 seconds should
be well enough. Please note that imfile keeps reading files as long as
diff --git a/doc/imjournal.html b/doc/imjournal.html
index 28b4701..a4b232e 100644
--- a/doc/imjournal.html
+++ b/doc/imjournal.html
@@ -30,7 +30,7 @@ probably resulting in a denial-of-service when the system ressouces get
exhausted. This can be somewhat mitigated by using proper rate-limiters, but
even then there are spikes of old data which are endlessly repeated. By default,
ratelimiting is activated and permits to process 20,000 messages within 10
-seconds, what should be well enough for most use cases. If insufficient, use
+minutes, what should be well enough for most use cases. If insufficient, use
the parameters described below to adjust the permitted volume.
<b>It is strongly recommended to use this plugin only if there
is hard need to do so.</b>
diff --git a/doc/imptcp.html b/doc/imptcp.html
index b5bd097..aece428 100644
--- a/doc/imptcp.html
+++ b/doc/imptcp.html
@@ -31,7 +31,10 @@ globaly to all inputs defined by the module.
Number of helper worker threads to process incoming messages. These
threads are utilized to pull data off the network. On a busy system, additional
helper threads (but not more than there are CPUs/Cores) can help improving
-performance. The default value is two.
+performance. The default value is two, which means there
+is a default thread count of three (the main input thread plus two
+helpers).
+No more than 16 threads can be set (if tried to, rsyslog always resorts to 16).
</ul>
<p><b>Input Parameters</b>:</p>
<p>These parameters can be used with the "input()" statement. They apply to the
@@ -135,11 +138,8 @@ Equivalent to: Port </li>
Equivalent to: Name </li>
<li>$InputPTCPServerBindRuleset &lt;name&gt;<br>
Equivalent to: Ruleset </li>
-<li>$InputPTCPHelperThreads &lt;number&gt;<br>
-Number of helper worker threads to process incoming messages. These
-threads are utilized to pull data off the network. On a busy system, additional
-helper threads (but not more than there are CPUs/Cores) can help improving
-performance. The default value is two.
+<li>$InputPTCPServerHelperThreads &lt;number&gt;<br>
+Equivalent to: threads </li>
<li>$InputPTCPServerListenIP &lt;name&gt;<br>
Equivalent to: Address </li>
</ul>
@@ -159,7 +159,7 @@ $InputPTCPServerRun 514
<p><font size="2">This documentation is part of the
<a href="http://www.rsyslog.com/">rsyslog</a>
project.<br>
-Copyright &copy; 2010-2012 by <a href="http://www.gerhards.net/rainer">Rainer
+Copyright &copy; 2010-2013 by <a href="http://www.gerhards.net/rainer">Rainer
Gerhards</a> and
<a href="http://www.adiscon.com/">Adiscon</a>.
Released under the GNU GPL version 3 or higher.</font></p>
diff --git a/doc/imudp.html b/doc/imudp.html
index 6c94953..a8dbca3 100644
--- a/doc/imudp.html
+++ b/doc/imudp.html
@@ -72,7 +72,7 @@ the default of "imudp" is used and the port is appended to that default. So,
for example, a listner port of 514 in that case will lead to an inputname
of "imudp514". The ability to append a port is most useful when multiple ports
are defined for a single input and each of the inputnames shall be unique.
-Note that there currently is no differentiation between IPv4/v6 listners on
+Note that there currently is no differentiation between IPv4/v6 listeners on
the same port.
</li>
</ul>
@@ -91,7 +91,7 @@ user account.
input(type="imudp" port="514")
</textarea>
-<p>In the next example, we set up three listners at ports 10514, 10515 and 10516
+<p>In the next example, we set up three listeners at ports 10514, 10515 and 10516
and assign a listner name of "udp" to it, followed by the port number:
</p>
<textarea rows="4" cols="60">module(load="imudp")
diff --git a/doc/manual.html b/doc/manual.html
index bc57c13..3c0c6ce 100644
--- a/doc/manual.html
+++ b/doc/manual.html
@@ -19,7 +19,7 @@ professional services</a> available directly from the source!</p>
<p><b>Please visit the <a href="http://www.rsyslog.com/sponsors">rsyslog sponsor's page</a>
to honor the project sponsors or become one yourself!</b> We are very grateful for any help towards the
project goals.</p>
-<p><b>This documentation is for version 7.4.1 (v7.4-stable branch) of rsyslog.</b>
+<p><b>This documentation is for version 7.4.2 (v7.4-stable branch) of rsyslog.</b>
Visit the <i><a href="http://www.rsyslog.com/status">rsyslog status page</a></i></b>
to obtain current version information and project status.
</p><p><b>If you like rsyslog, you might
diff --git a/doc/multi_ruleset.html b/doc/multi_ruleset.html
index 37c5406..83c495c 100644
--- a/doc/multi_ruleset.html
+++ b/doc/multi_ruleset.html
@@ -191,7 +191,7 @@ ruleset(name="test1"){
}
-# and now define listners bound to the relevant ruleset
+# and now define listeners bound to the relevant ruleset
input(type="imptcp" port="10514" ruleset="remote10514")
input(type="imptcp" port="10515" ruleset="remote10515")
input(type="imptcp" port="10516" ruleset="remote10516")
diff --git a/doc/multi_ruleset_legacy_format.html b/doc/multi_ruleset_legacy_format.html
index 5a9e7a4..273a4a0 100644
--- a/doc/multi_ruleset_legacy_format.html
+++ b/doc/multi_ruleset_legacy_format.html
@@ -168,7 +168,7 @@ mail.* /var/log/mail10516
# being written to the remote10516 file - as usual...
*.* /var/log/remote10516
-# and now define listners bound to the relevant ruleset
+# and now define listeners bound to the relevant ruleset
$InputTCPServerBindRuleset remote10514
$InputTCPServerRun 10514
diff --git a/doc/omfile.html b/doc/omfile.html
index 438d694..cd53fd1 100644
--- a/doc/omfile.html
+++ b/doc/omfile.html
@@ -102,72 +102,68 @@
<p>The following command writes all syslog messages into a file.</p>
<textarea rows="5" cols="60">Module (load="builtin:omfile")
*.* action(type="omfile"
-DirCreateMode="0700"
-FileCreateMode="0644"
-File="/var/log/messages")
+ DirCreateMode="0700"
+ FileCreateMode="0644"
+ File="/var/log/messages")
</textarea>
<br><br>
<p><b>Legacy Configuration Directives</b>:</p>
<ul>
- <li><strong>$DynaFileCacheSize </strong>(not mandatory, default 10)<br>
- defines the maximum size of the dynafile cache for <b>this</b>
- action. Cache size greatly affects performance and should be
- set so that it matches the actual need. Note that files
- inside the cache are kept open until either rsyslogd
- is HUPed or the file is evicted from the cache.<br></li><br>
-
- <li><strong>$OMFileZipLevel </strong>0..9 [default 0]<br>
- if greater 0, turns on gzip compression of the output file. The higher the number, the better the compression, but also the more CPU is required for zipping.<br></li><br>
+ <li><strong>$DynaFileCacheSize </strong><br>
+ equivalent to the "dynaFileCacheSize" parameter<br></li><br>
- <li><strong>$OMFileFlushInterval </strong>(not mandatory, default will be used)<br>
- Defines a template to be used for the output. <br></li><br>
+ <li><strong>$OMFileZipLevel </strong><br>
+ equivalent to the "zipLevel" parameter<br></li><br>
- <li><strong>$OMFileASyncWriting </strong>on/off [default off]<br>
- if turned on, the files will be written in asynchronous mode via a separate thread. In that case, double buffers will be used so that one buffer can be filled while the other buffer is being written. Note that in order to enable FlushInterval, AsyncWriting must be set to "on". Otherwise, the flush interval will be ignored. Also note that when FlushOnTXEnd is "on" but AsyncWriting is off, output will only be written when the buffer is full. This may take several hours, or even require a rsyslog shutdown. However, a buffer flush can be forced in that case by sending rsyslogd a HUP signal. <br></li><br>
+ <li><strong>$OMFileFlushInterval </strong><br>
+ equivalent to the "flushInterval" parameter<br></li><br>
- <li><strong>$OMFileFlushOnTXEnd </strong>on/off [default on]<br>
- Omfile has the capability to write output using a buffered writer. Disk writes are only done when the buffer is full. So if an error happens during that write, data is potentially lost. In cases where this is unacceptable, set FlushOnTXEnd to on. Then, data is written at the end of each transaction (for pre-v5 this means after each log message) and the usual error recovery thus can handle write errors without data loss. Note that this option severely reduces the effect of zip compression and should be switched to off for that use case. Note that the default -on- is primarily an aid to preserve the traditional syslogd behaviour.<br></li><br>
+ <li><strong>$OMFileASyncWriting </strong><br>
+ equivalent to the "asyncWriting" parameter<br></li><br>
- <li><strong>$OMFileIOBufferSize </strong>&lt;size_nbr&gt;, default 4k<br>
- size of the buffer used to writing output data. The larger the buffer, the potentially better performance is. The default of 4k is quite conservative, it is useful to go up to 64k, and 128K if you used gzip compression (then, even higher sizes may make sense)<br></li><br>
+ <li><strong>$OMFileFlushOnTXEnd </strong><br>
+ equivalent to the "flushOnTXEnd" parameter<br></li><br>
+
+ <li><strong>$OMFileIOBufferSize </strong><br>
+ equivalent to the "IOBufferSize" parameter<br></li><br>
<li><strong>$DirOwner </strong><br>
- Set the file owner for directories newly created. Please note that this setting does not affect the owner of directories already existing. The parameter is a user name, for which the userid is obtained by rsyslogd during startup processing. Interim changes to the user mapping are not detected.<br></li><br>
+ equivalent to the "dirOwner" parameter<br></li><br>
<li><strong>$DirGroup </strong><br>
- Set the group for directories newly created. Please note that this setting does not affect the group of directories already existing. The parameter is a group name, for which the groupid is obtained by rsyslogd on during startup processing. Interim changes to the user mapping are not detected.<br></li><br>
+ equivalent to the "dirGroup" parameter<br></li><br>
<li><strong>$FileOwner </strong><br>
- Set the file owner for files newly created. Please note that this setting does not affect the owner of files already existing. The parameter is a user name, for which the userid is obtained by rsyslogd during startup processing. Interim changes to the user mapping are not detected.<br></li><br>
+ equivalent to the "fileOwner" parameter<br></li><br>
<li><strong>$FileGroup </strong><br>
- Set the group for files newly created. Please note that this setting does not affect the group of files already existing. The parameter is a group name, for which the groupid is obtained by rsyslogd during startup processing. Interim changes to the user mapping are not detected.<br></li><br>
+ equivalent to the "fileGroup" parameter<br></li><br>
- <li><strong>$DirCreateMode </strong>[defaul 0700]<br>
- This is the same as $FileCreateMode, but for directories automatically generated.<br></li><br>
+ <li><strong>$DirCreateMode </strong><br>
+ equivalent to the "dirCreateMode" parameter<br></li><br>
- <li><strong>$FileCreateMode </strong>[default 0644]<br>
- The FileCreateMode directive allows to specify the creation mode with which rsyslogd creates new files. If not specified, the value 0644 is used (which retains backward-compatibility with earlier releases). The value given must always be a 4-digit octal number, with the initial digit being zero. <br>Please note that the actual permission depend on rsyslogd's process umask. If in doubt, use "$umask 0000" right at the beginning of the configuration file to remove any restrictions. <br>FileCreateMode may be specified multiple times. If so, it specifies the creation mode for all selector lines that follow until the next $FileCreateMode directive. Order of lines is vitally important.<br></li><br>
+ <li><strong>$FileCreateMode </strong><br>
+ equivalent to the "fileCreateMode" parameter<br></li><br>
- <li><strong>$FailOnCHOwnFailure </strong>on/off [default on]<br>
- This option modifies behaviour of file creation. If different owners or groups are specified for new files or directories and rsyslogd fails to set these new owners or groups, it will log an error and NOT write to the file in question if that option is set to "on". If it is set to "off", the error will be ignored and processing continues. Keep in mind, that the files in this case may be (in)accessible by people who should not have permission. The default is "on".<br></li><br>
+ <li><strong>$FailOnCHOwnFailure </strong><br>
+ equivalent to the "failOnChOwnFailure" parameter<br></li><br>
<li><strong>$F$OMFileForceCHOwn </strong><br>
- force ownership change for all files<br></li><br>
+ equivalent to the "ForceChOwn" parameter<br></li><br>
- <li><strong>$CreateDirs </strong>on/off [default on]<br>
- create directories on an as-needed basis<br></li><br>
+ <li><strong>$CreateDirs </strong><br>
+ equivalent to the "createDirs" parameter<br></li><br>
- <li><strong>$ActionFileEnableSync </strong>on/off [default off]<br>
- enables file syncing capability of omfile.<br></li><br>
+ <li><strong>$ActionFileEnableSync </strong><br>
+ equivalent to the "enableSync" parameter<br></li><br>
- <li><strong>$ActionFileDefaultTemplate </strong>[templateName]<br>
- sets a new default template for file actions.<br></li><br>
+ <li><strong>$ActionFileDefaultTemplate </strong><br>
+ equivalent to the "template" module parameter<br></li><br>
<li><strong>$ResetConfigVariables </strong><br>
- Resets all configuration variables to their default value. Any settings made will not be applied to configuration lines following the $ResetConfigVariables. This is a good method to make sure no side-effects exists from previous directives. This directive has no parameters.<br></li><br>
+ Resets all configuration variables to their default value.<br></li><br>
</ul>
diff --git a/doc/rsconf1_rulesetcreatemainqueue.html b/doc/rsconf1_rulesetcreatemainqueue.html
index 5c1e0de..d09f95c 100644
--- a/doc/rsconf1_rulesetcreatemainqueue.html
+++ b/doc/rsconf1_rulesetcreatemainqueue.html
@@ -58,7 +58,7 @@ mail.* /var/log/mail10516
# being written to the remote10516 file - as usual...
*.* /var/log/remote10516
-# and now define listners bound to the relevant ruleset
+# and now define listeners bound to the relevant ruleset
$InputTCPServerBindRuleset remote10514
$InputTCPServerRun 10514
diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c
index 89cf946..95972fb 100644
--- a/grammar/rainerscript.c
+++ b/grammar/rainerscript.c
@@ -938,8 +938,14 @@ nvlstGetParams(struct nvlst *lst, struct cnfparamblk *params,
for(i = 0 ; i < params->nParams ; ++i) {
param = params->descr + i;
- if((valnode = nvlstFindNameCStr(lst, param->name)) == NULL)
+ if((valnode = nvlstFindNameCStr(lst, param->name)) == NULL) {
+ if(param->flags & CNFPARAM_REQUIRED) {
+ parser_errmsg("parameter '%s' required but not specified - "
+ "fix config", param->name);
+ bInError = 1;
+ }
continue;
+ }
if(vals[i].bUsed) {
parser_errmsg("parameter '%s' specified more than once - "
"one instance is ignored. Fix config", param->name);
@@ -950,7 +956,6 @@ nvlstGetParams(struct nvlst *lst, struct cnfparamblk *params,
}
}
-
if(bInError) {
if(bValsWasNULL)
cnfparamvalsDestruct(vals, params);
@@ -3444,6 +3449,8 @@ void
cnfparamvalsDestruct(struct cnfparamvals *paramvals, struct cnfparamblk *blk)
{
int i;
+ if(paramvals == NULL)
+ return;
for(i = 0 ; i < blk->nParams ; ++i) {
if(paramvals[i].bUsed) {
varDelete(&paramvals[i].val);
diff --git a/plugins/imfile/imfile.c b/plugins/imfile/imfile.c
index 349acea..2e80ffc 100644
--- a/plugins/imfile/imfile.c
+++ b/plugins/imfile/imfile.c
@@ -449,8 +449,6 @@ CODESTARTnewInpInst
pvals = nvlstGetParams(lst, &inppblk, NULL);
if(pvals == NULL) {
- errmsg.LogError(0, RS_RET_MISSING_CNFPARAMS,
- "imfile: required parameter are missing\n");
ABORT_FINALIZE(RS_RET_MISSING_CNFPARAMS);
}
@@ -596,7 +594,7 @@ CODESTARTactivateCnf
for(inst = runModConf->root ; inst != NULL ; inst = inst->next) {
addListner(inst);
}
- /* if we could not set up any listners, there is no point in running... */
+ /* if we could not set up any listeners, there is no point in running... */
if(iFilPtr == 0) {
errmsg.LogError(0, NO_ERRCODE, "imfile: no file monitors could be started, "
"input not activated.\n");
diff --git a/plugins/impstats/impstats.c b/plugins/impstats/impstats.c
index cdd205f..79749e2 100644
--- a/plugins/impstats/impstats.c
+++ b/plugins/impstats/impstats.c
@@ -29,6 +29,10 @@
#include <pthread.h>
#include <fcntl.h>
#include <sys/uio.h>
+#if defined(__FreeBSD__)
+#include <sys/stat.h>
+#endif
+
#include "dirty.h"
#include "cfsysline.h"
#include "module-template.h"
diff --git a/plugins/imptcp/imptcp.c b/plugins/imptcp/imptcp.c
index 5c8bb67..906521d 100644
--- a/plugins/imptcp/imptcp.c
+++ b/plugins/imptcp/imptcp.c
@@ -1419,10 +1419,7 @@ BEGINnewInpInst
CODESTARTnewInpInst
DBGPRINTF("newInpInst (imptcp)\n");
- pvals = nvlstGetParams(lst, &inppblk, NULL);
- if(pvals == NULL) {
- errmsg.LogError(0, RS_RET_MISSING_CNFPARAMS,
- "imptcp: required parameter are missing\n");
+ if((pvals = nvlstGetParams(lst, &inppblk, NULL)) == NULL) {
ABORT_FINALIZE(RS_RET_MISSING_CNFPARAMS);
}
diff --git a/plugins/imtcp/imtcp.c b/plugins/imtcp/imtcp.c
index fc22d45..2d9761c 100644
--- a/plugins/imtcp/imtcp.c
+++ b/plugins/imtcp/imtcp.c
@@ -141,6 +141,7 @@ static struct cnfparamdescr modpdescr[] = {
{ "addtlframedelimiter", eCmdHdlrPositiveInt, 0 },
{ "maxsessions", eCmdHdlrPositiveInt, 0 },
{ "maxlistners", eCmdHdlrPositiveInt, 0 },
+ { "maxlisteners", eCmdHdlrPositiveInt, 0 },
{ "streamdriver.mode", eCmdHdlrPositiveInt, 0 },
{ "streamdriver.authmode", eCmdHdlrString, 0 },
{ "permittedpeer", eCmdHdlrArray, 0 },
@@ -453,7 +454,8 @@ CODESTARTsetModCnf
loadModConf->iAddtlFrameDelim = (int) pvals[i].val.d.n;
} else if(!strcmp(modpblk.descr[i].name, "maxsessions")) {
loadModConf->iTCPSessMax = (int) pvals[i].val.d.n;
- } else if(!strcmp(modpblk.descr[i].name, "maxlistners")) {
+ } else if(!strcmp(modpblk.descr[i].name, "maxlisteners") ||
+ !strcmp(modpblk.descr[i].name, "maxlistners")) { /* keep old name for a while */
loadModConf->iTCPLstnMax = (int) pvals[i].val.d.n;
} else if(!strcmp(modpblk.descr[i].name, "keepalive")) {
loadModConf->bKeepAlive = (int) pvals[i].val.d.n;
diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c
index 7bf1473..312645b 100644
--- a/plugins/imudp/imudp.c
+++ b/plugins/imudp/imudp.c
@@ -746,10 +746,7 @@ BEGINnewInpInst
CODESTARTnewInpInst
DBGPRINTF("newInpInst (imudp)\n");
- pvals = nvlstGetParams(lst, &inppblk, NULL);
- if(pvals == NULL) {
- errmsg.LogError(0, RS_RET_MISSING_CNFPARAMS,
- "imudp: required parameter are missing\n");
+ if((pvals = nvlstGetParams(lst, &inppblk, NULL)) == NULL) {
ABORT_FINALIZE(RS_RET_MISSING_CNFPARAMS);
}
if(Debug) {
@@ -872,7 +869,7 @@ CODESTARTactivateCnfPrePrivDrop
for(inst = runModConf->root ; inst != NULL ; inst = inst->next) {
addListner(inst);
}
- /* if we could not set up any listners, there is no point in running... */
+ /* if we could not set up any listeners, there is no point in running... */
if(lcnfRoot == NULL) {
errmsg.LogError(0, NO_ERRCODE, "imudp: no listeners could be started, "
"input not activated.\n");
@@ -898,7 +895,6 @@ CODESTARTfreeCnf
for(inst = pModConf->root ; inst != NULL ; ) {
free(inst->pszBindPort);
free(inst->pszBindAddr);
- free(inst->pBindRuleset);
free(inst->inputname);
del = inst;
inst = inst->next;
diff --git a/plugins/omelasticsearch/omelasticsearch.c b/plugins/omelasticsearch/omelasticsearch.c
index 33e58c1..57abefd 100644
--- a/plugins/omelasticsearch/omelasticsearch.c
+++ b/plugins/omelasticsearch/omelasticsearch.c
@@ -483,7 +483,6 @@ writeDataError(instanceData *pData, cJSON **pReplyRoot, uchar *reqmsg)
DBGPRINTF("omelasticsearch: error %d writing error file, write returns %lld\n",
errno, (long long) wrRet);
}
- free(rendered);
cJSON_Delete(errRoot);
*pReplyRoot = NULL; /* tell caller not to delete once again! */
diff --git a/plugins/omrelp/omrelp.c b/plugins/omrelp/omrelp.c
index ae65f40..3e35546 100644
--- a/plugins/omrelp/omrelp.c
+++ b/plugins/omrelp/omrelp.c
@@ -79,7 +79,7 @@ static struct cnfparamdescr actpdescr[] = {
{ "target", eCmdHdlrGetWord, 1 },
{ "port", eCmdHdlrGetWord, 0 },
{ "timeout", eCmdHdlrInt, 0 },
- { "template", eCmdHdlrGetWord, 1 }
+ { "template", eCmdHdlrGetWord, 0 }
};
static struct cnfparamblk actpblk =
{ CNFPARAMBLK_VERSION,
@@ -179,7 +179,8 @@ CODESTARTnewActInst
CHKiRet(doCreateRelpClient(pData));
CODE_STD_FINALIZERnewActInst
- cnfparamvalsDestruct(pvals, &actpblk);
+ if(pvals != NULL)
+ cnfparamvalsDestruct(pvals, &actpblk);
ENDnewActInst
BEGINisCompatibleWithFeature
diff --git a/runtime/lmsig_gt.c b/runtime/lmsig_gt.c
index e9194c7..116a48d 100644
--- a/runtime/lmsig_gt.c
+++ b/runtime/lmsig_gt.c
@@ -89,7 +89,11 @@ SetCnfParam(void *pT, struct nvlst *lst)
int i;
uchar *cstr;
struct cnfparamvals *pvals;
+ DEFiRet;
pvals = nvlstGetParams(lst, &pblk, NULL);
+ if(pvals == NULL) {
+ ABORT_FINALIZE(RS_RET_MISSING_CNFPARAMS);
+ }
if(Debug) {
dbgprintf("sig param blk in lmsig_gt:\n");
cnfparamsPrint(&pblk, pvals);
@@ -120,8 +124,10 @@ SetCnfParam(void *pT, struct nvlst *lst)
"param '%s'\n", pblk.descr[i].name);
}
}
- cnfparamvalsDestruct(pvals, &pblk);
- return RS_RET_OK;
+finalize_it:
+ if(pvals != NULL)
+ cnfparamvalsDestruct(pvals, &pblk);
+ RETiRet;
}
diff --git a/runtime/msg.c b/runtime/msg.c
index a5c5281..9d5fa88 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -2989,15 +2989,39 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe,
break;
case PROP_SYS_UPTIME:
# ifndef HAVE_SYSINFO_UPTIME
- /* An alternative on some systems (eg Solaris) is to scan
- * /var/adm/utmpx for last boot time.
- */
+ /* An alternative on some systems (eg Solaris) is to scan
+ * /var/adm/utmpx for last boot time.
+ */
pRes = (uchar*) "UPTIME NOT available on this system";
*pbMustBeFreed = 0;
+
+# elif defined(__FreeBSD__)
+
+ {
+ struct timespec tp;
+
+ if(*pbMustBeFreed == 1)
+ free(pRes);
+ if((pRes = (uchar*) MALLOC(sizeof(uchar) * 32)) == NULL) {
+ RET_OUT_OF_MEMORY;
+ }
+ *pbMustBeFreed = 1;
+
+ if(clock_gettime(CLOCK_UPTIME, &tp) == -1) {
+ *pPropLen = sizeof("**SYSCALL FAILED**") - 1;
+ return(UCHAR_CONSTANT("**SYSCALL FAILED**"));
+ }
+
+ snprintf((char*) pRes, sizeof(uchar) * 32, "%ld", tp.tv_sec);
+ }
+
# else
+
{
struct sysinfo s_info;
+ if(*pbMustBeFreed == 1)
+ free(pRes);
if((pRes = (uchar*) MALLOC(sizeof(uchar) * 32)) == NULL) {
RET_OUT_OF_MEMORY;
}
diff --git a/runtime/net.c b/runtime/net.c
index b291213..13391cc 100644
--- a/runtime/net.c
+++ b/runtime/net.c
@@ -232,6 +232,7 @@ finalize_it:
/* enqueue the element */
if(pPeer->pWildcardRoot == NULL) {
pPeer->pWildcardRoot = pNew;
+ pPeer->pWildcardLast = pNew;
} else {
pPeer->pWildcardLast->pNext = pNew;
}
diff --git a/runtime/stream.c b/runtime/stream.c
index b781324..54210e4 100644
--- a/runtime/stream.c
+++ b/runtime/stream.c
@@ -67,7 +67,6 @@
# define O_LARGEFILE 0
#endif
#ifndef HAVE_LSEEK64
- typedef off_t off64_t;
# define lseek64(fd, offset, whence) lseek(fd, offset, whence)
#endif
diff --git a/runtime/strmsrv.h b/runtime/strmsrv.h
index 9ef28e4..f3d56d1 100644
--- a/runtime/strmsrv.h
+++ b/runtime/strmsrv.h
@@ -43,7 +43,7 @@ struct strmsrv_s {
uchar *pszInputName; /**< value to be used as input name */
permittedPeers_t *pPermPeers;/**< driver's permitted peers */
int iLstnMax; /**< max nbr of listeners currently supported */
- netstrm_t **ppLstn; /**< our netstream listners */
+ netstrm_t **ppLstn; /**< our netstream listeners */
strmLstnPortList_t **ppLstnPort; /**< pointer to relevant listen port description */
int iSessMax; /**< max number of sessions supported */
strmLstnPortList_t *pLstnPorts; /**< head pointer for listen ports */
diff --git a/runtime/typedefs.h b/runtime/typedefs.h
index 5cc24e4..d3f68b4 100644
--- a/runtime/typedefs.h
+++ b/runtime/typedefs.h
@@ -3,7 +3,7 @@
*
* Begun 2010-11-25 RGerhards
*
- * Copyright (C) 2005-2008 by Rainer Gerhards and Adiscon GmbH
+ * Copyright (C) 2005-2013 by Rainer Gerhards and Adiscon GmbH
*
* This file is part of the rsyslog runtime library.
*
@@ -25,6 +25,13 @@
*/
#ifndef INCLUDED_TYPEDEFS_H
#define INCLUDED_TYPEDEFS_H
+#if defined(__FreeBSD__)
+#include <sys/types.h>
+#endif
+
+#ifndef HAVE_LSEEK64
+#include <unistd.h>
+#endif
/* some universal fixed size integer defines ... */
typedef long long int64;
@@ -148,6 +155,10 @@ typedef enum {
FIOP_ISEMPTY = 6 /* string empty <=> strlen(s) == 0 ?*/
} fiop_t;
+#ifndef HAVE_LSEEK64
+ typedef off_t off64_t;
+#endif
+
/* types of configuration handlers
*/
typedef enum cslCmdHdlrType {
diff --git a/tcpsrv.h b/tcpsrv.h
index 93e472c..c9d491d 100644
--- a/tcpsrv.h
+++ b/tcpsrv.h
@@ -63,9 +63,9 @@ struct tcpsrv_s {
sbool bUsingEPoll; /**< are we in epoll mode (means we do not need to keep track of sessions!) */
sbool bUseFlowControl; /**< use flow control (make light delayable) */
int iLstnCurr; /**< max nbr of listeners currently supported */
- netstrm_t **ppLstn; /**< our netstream listners */
+ netstrm_t **ppLstn; /**< our netstream listeners */
tcpLstnPortList_t **ppLstnPort; /**< pointer to relevant listen port description */
- int iLstnMax; /**< max number of listners supported */
+ int iLstnMax; /**< max number of listeners supported */
int iSessMax; /**< max number of sessions supported */
tcpLstnPortList_t *pLstnPorts; /**< head pointer for listen ports */
diff --git a/tests/diag.sh b/tests/diag.sh
index 2fdcbfb..7883d93 100755
--- a/tests/diag.sh
+++ b/tests/diag.sh
@@ -109,6 +109,7 @@ case $1 in
echo Shutting down instance 2
fi
$srcdir/diag.sh wait-queueempty $2
+ ./msleep 100 # wait 100 milliseconds
kill `cat rsyslog$2.pid`
# note: we do not wait for the actual termination!
;;