summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2012-10-16 16:44:03 +0200
committerMichael Biebl <biebl@debian.org>2012-10-16 16:44:03 +0200
commit1fc4db11217caa3faebbfde8bd310fb64c9f860c (patch)
tree39fca9174460f0a55e46b67793dea0c35e537ac0
parent64b89c604c6cec4fd0de51f2776f95b34e388bae (diff)
downloadrsyslog-1fc4db11217caa3faebbfde8bd310fb64c9f860c.tar.gz
Imported Upstream version 7.1.11upstream/7.1.11
-rw-r--r--ChangeLog30
-rwxr-xr-xconfigure22
-rw-r--r--configure.ac4
-rw-r--r--doc/manual.html2
-rw-r--r--doc/v7compatibility.html17
-rw-r--r--plugins/imuxsock/imuxsock.c10
-rw-r--r--plugins/mmjsonparse/mmjsonparse.c2
-rw-r--r--plugins/omruleset/omruleset.c6
-rw-r--r--runtime/msg.c13
-rw-r--r--runtime/rsyslog.h1
-rw-r--r--tools/omdiscard.c8
11 files changed, 89 insertions, 26 deletions
diff --git a/ChangeLog b/ChangeLog
index 2d5d34f..7b73cf7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,20 @@
---------------------------------------------------------------------------
+Version 7.1.11 [beta] 2012-10-16
+- bugfix: imuxsock truncated head of received message
+ This happened only under some circumstances. Thanks to Marius
+ Tomaschwesky, Florian Piekert and Milan Bartos for their help in
+ solving this issue.
+- bugfix: do not crash if set statement is used with date field
+ Thanks to Miloslav Trmač for the patch.
+- change lumberjack cookie to "@cee:" from "@cee: "
+ CEE originally specified the cookie with SP, whereas other lumberjack
+ tools used it without space. In order to keep interop with lumberjack,
+ we now use the cookie without space as well. I hope this can be changed
+ in CEE as well when it is released at a later time.
+ Thanks to Miloslav Trmač for pointing this out and a similiar v7 patch.
+- added deprecated note to omruleset (plus clue to use "call")
+- added deprecated note to discard action (plus clue to use "stop")
+ ---------------------------------------------------------------------------
Version 7.1.10 [beta] 2012-10-11
- bugfix: m4 directory was not present in release tarball
- bugfix: small memory leak with string-type templates
@@ -156,6 +172,16 @@ Version 6.5.0 [devel] 2012-08-28
http://bugzilla.adiscon.com/show_bug.cgi?id=353
---------------------------------------------------------------------------
Version 6.4.3 [V6-STABLE] 2012-??-??
+- bugfix: imuxsock truncated head of received message
+ This happened only under some circumstances. Thanks to Marius
+ Tomaschwesky, Florian Piekert and Milan Bartos for their help in
+ solving this issue.
+- change lumberjack cookie to "@cee:" from "@cee: "
+ CEE originally specified the cookie with SP, whereas other lumberjack
+ tools used it without space. In order to keep interop with lumberjack,
+ we now use the cookie without space as well. I hope this can be changed
+ in CEE as well when it is released at a later time.
+ Thanks to Miloslav Trmač for pointing this out and a similiar v7 patch.
- bugfix: comments inside objects (e.g. action()) were not properly handled
- bugfix: sysklogd-emulating standard template was no longer present in v6
This was obviously lost during the transition to the new config format.
@@ -731,6 +757,10 @@ expected that interfaces, even new ones, break during the initial
[ported from v4]
---------------------------------------------------------------------------
Version 5.10.1 [V5-STABLE], 2012-0?-??
+- bugfix: imuxsock truncated head of received message
+ This happened only under some circumstances. Thanks to Marius
+ Tomaschwesky, Florian Piekert and Milan Bartos for their help in
+ solving this issue.
- enable DNS resolution in imrelp
Thanks to Apollon Oikonomopoulos for the patch
- bugfix: invalid property name in property-filter could cause abort
diff --git a/configure b/configure
index 9944acd..141c0fc 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.67 for rsyslog 7.1.10.
+# Generated by GNU Autoconf 2.67 for rsyslog 7.1.11.
#
# Report bugs to <rsyslog@lists.adiscon.com>.
#
@@ -701,8 +701,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='rsyslog'
PACKAGE_TARNAME='rsyslog'
-PACKAGE_VERSION='7.1.10'
-PACKAGE_STRING='rsyslog 7.1.10'
+PACKAGE_VERSION='7.1.11'
+PACKAGE_STRING='rsyslog 7.1.11'
PACKAGE_BUGREPORT='rsyslog@lists.adiscon.com'
PACKAGE_URL=''
@@ -1683,7 +1683,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.1.10 to adapt to many kinds of systems.
+\`configure' configures rsyslog 7.1.11 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1753,7 +1753,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of rsyslog 7.1.10:";;
+ short | recursive ) echo "Configuration of rsyslog 7.1.11:";;
esac
cat <<\_ACEOF
@@ -1825,7 +1825,7 @@ Optional Features:
Compiles aixforwardedfrom parser module [default=no]
--enable-pmsnare Compiles snare parser module [default=no]
--enable-pmrfc3164sd Compiles rfc3164sd parser module [default=no]
- --enable-omruleset Compiles ruleset forwarding module [default=yes]
+ --enable-omruleset Compiles ruleset forwarding module [default=no]
--enable-gui Enable GUI programs [default=no]
--enable-omuxsock Compiles omuxsock module [default=no]
--enable-sm_cust_bindcdr
@@ -1967,7 +1967,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-rsyslog configure 7.1.10
+rsyslog configure 7.1.11
generated by GNU Autoconf 2.67
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2546,7 +2546,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.1.10, which was
+It was created by rsyslog $as_me 7.1.11, which was
generated by GNU Autoconf 2.67. Invocation command line was
$ $0 $@
@@ -3361,7 +3361,7 @@ fi
# Define the identity of the package.
PACKAGE='rsyslog'
- VERSION='7.1.10'
+ VERSION='7.1.11'
cat >>confdefs.h <<_ACEOF
@@ -18807,7 +18807,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.1.10, which was
+This file was extended by rsyslog $as_me 7.1.11, which was
generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -18873,7 +18873,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.1.10
+rsyslog config.status 7.1.11
configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 7e3543c..09217d0 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.1.10],[rsyslog@lists.adiscon.com])
+AC_INIT([rsyslog],[7.1.11],[rsyslog@lists.adiscon.com])
AM_INIT_AUTOMAKE
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -1188,7 +1188,7 @@ AM_CONDITIONAL(ENABLE_PMRFC3164SD, test x$enable_pmrfc3164sd = xyes)
# settings for omruleset
AC_ARG_ENABLE(omruleset,
- [AS_HELP_STRING([--enable-omruleset],[Compiles ruleset forwarding module @<:@default=yes@:>@])],
+ [AS_HELP_STRING([--enable-omruleset],[Compiles ruleset forwarding module @<:@default=no@:>@])],
[case "${enableval}" in
yes) enable_omruleset="yes" ;;
no) enable_omruleset="no" ;;
diff --git a/doc/manual.html b/doc/manual.html
index 6fa3c01..cfad1a6 100644
--- a/doc/manual.html
+++ b/doc/manual.html
@@ -19,7 +19,7 @@ rsyslog support</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.1.10 (beta branch) of rsyslog.</b>
+<p><b>This documentation is for version 7.1.11 (beta 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/v7compatibility.html b/doc/v7compatibility.html
index be89f66..692a4fe 100644
--- a/doc/v7compatibility.html
+++ b/doc/v7compatibility.html
@@ -25,6 +25,23 @@ has been implemented. Consequently, situations where the previous behaviour were
desired need now to be solved differently. We do not think that this will cause any
problems to anyone, especially as in v6 this was announced as a missing feature.
+<h2>omruleset and discard (~) action are deprecated</h2>
+<p>Both continue to work, but have been replaced by better alternatives.
+<p>The discard action (tilde character) has been replaced by the "stop"
+RainerScript directive. It is considered more intuitive and offers slightly
+better performance.
+<p>The omruleset module has been replaced by the "call" RainerScript directive.
+Call permits to execute a ruleset like a subroutine, and does so with much
+higher performance than omruleset did. Note that omruleset could be run off
+an async queue. This was more a side than a desired effect and is not supported
+by the call statement. If that effect was needed, it can simply be simulated by
+running the called rulesets actions asynchronously (what in any case is the right
+way to handle this).
+<p>Note that the deprecated modules emit warning messages when being used.
+They tell that the construct is deprecated and which statement is to be used
+as replacement. This does <b>not</b> affect operations: both modules are still
+fully operational and will not be removed in the v7 timeframe.
+
<p><font size="2">This documentation is part of the
<a href="http://www.rsyslog.com/">rsyslog</a> project.<br>
Copyright &copy; 2011-2012 by <a href="http://www.gerhards.net/rainer">Rainer Gerhards</a> and
diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c
index a493311..79d8c5d 100644
--- a/plugins/imuxsock/imuxsock.c
+++ b/plugins/imuxsock/imuxsock.c
@@ -915,7 +915,7 @@ SubmitMsg(uchar *pRcv, int lenRcv, lstn_t *pLstn, struct ucred *cred, struct tim
CHKiRet(msgConstructWithTime(&pMsg, &st, tt));
MsgSetRawMsg(pMsg, (char*)pRcv, lenRcv);
parser.SanitizeMsg(pMsg);
- lenMsg = pMsg->iLenRawMsg - offs;
+ lenMsg = pMsg->iLenRawMsg - offs; /* SanitizeMsg() may have changed the size */
MsgSetInputName(pMsg, pInputName);
MsgSetFlowControlType(pMsg, pLstn->flowCtl);
@@ -952,7 +952,6 @@ SubmitMsg(uchar *pRcv, int lenRcv, lstn_t *pLstn, struct ucred *cred, struct tim
parse[15] = ' '; /* re-write \0 from fromatTimestamp3164 by SP */
/* update "counters" to reflect processed timestamp */
parse += 16;
- lenMsg -= 16;
}
}
@@ -967,12 +966,7 @@ SubmitMsg(uchar *pRcv, int lenRcv, lstn_t *pLstn, struct ucred *cred, struct tim
if(pLstn->bWritePid)
fixPID(bufParseTAG, &i, cred);
MsgSetTAG(pMsg, bufParseTAG, i);
-
- if (pLstn->bAnnotate) {
- MsgSetMSGoffs(pMsg, pMsg->iLenRawMsg - lenMsg - 16);
- } else {
- MsgSetMSGoffs(pMsg, pMsg->iLenRawMsg - lenMsg);
- }
+ MsgSetMSGoffs(pMsg, pMsg->iLenRawMsg - lenMsg);
if(pLstn->bParseHost) {
pMsg->msgFlags = pLstn->flags | PARSE_HOSTNAME;
diff --git a/plugins/mmjsonparse/mmjsonparse.c b/plugins/mmjsonparse/mmjsonparse.c
index 68f5e74..da5cfb5 100644
--- a/plugins/mmjsonparse/mmjsonparse.c
+++ b/plugins/mmjsonparse/mmjsonparse.c
@@ -138,7 +138,7 @@ finalize_it:
RETiRet;
}
-#define COOKIE "@cee: "
+#define COOKIE "@cee:"
#define LEN_COOKIE (sizeof(COOKIE)-1)
BEGINdoAction
msg_t *pMsg;
diff --git a/plugins/omruleset/omruleset.c b/plugins/omruleset/omruleset.c
index 67aee97..6c770c9 100644
--- a/plugins/omruleset/omruleset.c
+++ b/plugins/omruleset/omruleset.c
@@ -165,6 +165,9 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1)
p += sizeof(":omruleset:") - 1; /* eat indicator sequence (-1 because of '\0'!) */
CHKiRet(createInstance(&pData));
+ errmsg.LogError(0, RS_RET_DEPRECATED, "warning: omruleset is deprecated, consider "
+ "using the 'call' statement instead");
+
/* check if a non-standard template is to be applied */
if(*(p-1) == ';')
--p;
@@ -237,6 +240,9 @@ CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(objUse(ruleset, CORE_COMPONENT));
CHKiRet(objUse(errmsg, CORE_COMPONENT));
+ errmsg.LogError(0, RS_RET_DEPRECATED, "warning: omruleset is deprecated, consider "
+ "using the 'call' statement instead");
+
CHKiRet(omsdRegCFSLineHdlr((uchar *)"actionomrulesetrulesetname", 0, eCmdHdlrGetWord,
setRuleset, NULL, STD_LOADABLE_MODULE_ID));
CHKiRet(omsdRegCFSLineHdlr((uchar *)"resetconfigvariables", 1, eCmdHdlrCustomHandler,
diff --git a/runtime/msg.c b/runtime/msg.c
index d3c814e..d874178 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -2698,6 +2698,7 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe,
uchar *pBuf;
int iLen;
short iOffs;
+ enum tplFormatTypes datefmt;
BEGINfunc
assert(pMsg != NULL);
@@ -2717,7 +2718,11 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe,
bufLen = getMSGLen(pMsg);
break;
case PROP_TIMESTAMP:
- pRes = (uchar*)getTimeReported(pMsg, pTpe->data.field.eDateFormat);
+ if (pTpe != NULL)
+ datefmt = pTpe->data.field.eDateFormat;
+ else
+ datefmt = tplFmtDefault;
+ pRes = (uchar*)getTimeReported(pMsg, datefmt);
break;
case PROP_HOSTNAME:
pRes = (uchar*)getHOSTNAME(pMsg);
@@ -2767,7 +2772,11 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe,
pRes = (uchar*)getSeverityStr(pMsg);
break;
case PROP_TIMEGENERATED:
- pRes = (uchar*)getTimeGenerated(pMsg, pTpe->data.field.eDateFormat);
+ if (pTpe != NULL)
+ datefmt = pTpe->data.field.eDateFormat;
+ else
+ datefmt = tplFmtDefault;
+ pRes = (uchar*)getTimeGenerated(pMsg, datefmt);
break;
case PROP_PROGRAMNAME:
pRes = getProgramName(pMsg, LOCK_MUTEX);
diff --git a/runtime/rsyslog.h b/runtime/rsyslog.h
index 4404c47..07d58d6 100644
--- a/runtime/rsyslog.h
+++ b/runtime/rsyslog.h
@@ -392,6 +392,7 @@ enum rsRetVal_ /** return value. All methods return this if not specified oth
RS_RET_JNAME_NOTFOUND = -2305, /**< JSON name not found (does not exist) */
RS_RET_INVLD_SETOP = -2305, /**< invalid variable set operation, incompatible type */
RS_RET_RULESET_EXISTS = -2306,/**< ruleset already exists */
+ RS_RET_DEPRECATED = -2307,/**< deprecated functionality is used */
/* RainerScript error messages (range 1000.. 1999) */
RS_RET_SYSVAR_NOT_FOUND = 1001, /**< system variable could not be found (maybe misspelled) */
diff --git a/tools/omdiscard.c b/tools/omdiscard.c
index 182c4b6..15c6ea8 100644
--- a/tools/omdiscard.c
+++ b/tools/omdiscard.c
@@ -35,6 +35,7 @@
#include "syslogd-types.h"
#include "omdiscard.h"
#include "module-template.h"
+#include "errmsg.h"
MODULE_TYPE_OUTPUT
MODULE_TYPE_NOKEEP
@@ -42,6 +43,7 @@ MODULE_TYPE_NOKEEP
/* internal structures
*/
DEF_OMOD_STATIC_DATA
+DEFobjCurrIf(errmsg);
typedef struct _instanceData {
EMPTY_STRUCT
@@ -92,8 +94,10 @@ CODE_STD_STRING_REQUESTparseSelectorAct(0)
p = *pp;
if(*p == '~') {
- /* TODO: check the rest of the selector line - error reporting */
dbgprintf("discard\n");
+ errmsg.LogError(0, RS_RET_DEPRECATED, "warning: ~ action "
+ "is deprecated, consider using the 'stop' "
+ "statement instead");
} else {
iRet = RS_RET_CONFLINE_UNPROCESSED;
}
@@ -103,6 +107,7 @@ ENDparseSelectorAct
BEGINmodExit
CODESTARTmodExit
+ objRelease(errmsg, CORE_COMPONENT);
ENDmodExit
@@ -116,6 +121,7 @@ BEGINmodInit(Discard)
CODESTARTmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
+ CHKiRet(objUse(errmsg, CORE_COMPONENT));
ENDmodInit
/*
* vi:set ai: