From 5cd9b52ea5a75c4dff3d92683ff51d4e02cb1fd5 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 7 Jan 2013 15:27:27 +0100 Subject: bugfix: very large memory consumption (and probably out of memory) ...when FromPos was specified in template, but ToPos not. Thanks to Radu Gheorghe for alerting us of this bug. --- ChangeLog | 3 +++ runtime/msg.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9bf2102f..0d088727 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,9 @@ Version 7.2.5 [v7-stable] 2013-01-?? shutdown phase*. This affected only the LAST batches being processed. No problem existed during the regular run. Could usually only happen on very busy systems, which were still busy during shutdown. +- bugfix: very large memory consumption (and probably out of memory) when + FromPos was specified in template, but ToPos not. + Thanks to Radu Gheorghe for alerting us of this bug. ---------------------------------------------------------------------------- Version 7.2.4 [v7-stable] 2012-12-07 - enhance: permit RFC3339 timestamp in local log socket messages diff --git a/runtime/msg.c b/runtime/msg.c index 09f6d649..10605ba4 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -3027,6 +3027,8 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe, */ ; /*DO NOTHING*/ } else { + if(iTo > bufLen) /* iTo is very large, if no to-position is set in the template! */ + iTo = bufLen; iLen = iTo - iFrom + 1; /* the +1 is for an actual char, NOT \0! */ pBufStart = pBuf = MALLOC((iLen + 1) * sizeof(char)); if(pBuf == NULL) { -- cgit v1.2.3 From 5c9fd7c96fe5f2d363fe0f7d60922cb97632b884 Mon Sep 17 00:00:00 2001 From: David Hill Date: Tue, 8 Jan 2013 09:30:56 +0100 Subject: bugfix: timeval2syslogTime cause problems on some platforms ...due to invalid assumption on structure data types. closes: http://bugzilla.adiscon.com/show_bug.cgi?id=394 --- ChangeLog | 4 ++++ runtime/datetime.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0d088727..67a458ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,10 @@ Version 7.2.5 [v7-stable] 2013-01-?? - bugfix: very large memory consumption (and probably out of memory) when FromPos was specified in template, but ToPos not. Thanks to Radu Gheorghe for alerting us of this bug. +- bugfix: timeval2syslogTime cause problems on some platforms + due to invalid assumption on structure data types. + closes: http://bugzilla.adiscon.com/show_bug.cgi?id=394 + Thanks to David Hill for the patch. ---------------------------------------------------------------------------- Version 7.2.4 [v7-stable] 2012-12-07 - enhance: permit RFC3339 timestamp in local log socket messages diff --git a/runtime/datetime.c b/runtime/datetime.c index c03abab9..7d974471 100644 --- a/runtime/datetime.c +++ b/runtime/datetime.c @@ -61,8 +61,10 @@ timeval2syslogTime(struct timeval *tp, struct syslogTime *t) struct tm *tm; struct tm tmBuf; long lBias; + time_t secs; - tm = localtime_r((time_t*) &(tp->tv_sec), &tmBuf); + secs = tp->tv_sec; + tm = localtime_r(&secs, &tmBuf); t->year = tm->tm_year + 1900; t->month = tm->tm_mon + 1; -- cgit v1.2.3 From 9955c1f5795b2397e3cf75c5bf89f5e1e28ba001 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 8 Jan 2013 09:36:03 +0100 Subject: amend last commit with license info (ASL 2.0 as of email conversation with David) --- ChangeLog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 67a458ae..f1e2ab73 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,7 +16,8 @@ Version 7.2.5 [v7-stable] 2013-01-?? - bugfix: timeval2syslogTime cause problems on some platforms due to invalid assumption on structure data types. closes: http://bugzilla.adiscon.com/show_bug.cgi?id=394 - Thanks to David Hill for the patch. + Thanks to David Hill for the patch [under ASL2.0 as per email conversation + 2013-01-03]. ---------------------------------------------------------------------------- Version 7.2.4 [v7-stable] 2012-12-07 - enhance: permit RFC3339 timestamp in local log socket messages -- cgit v1.2.3 From 9fb9fa03a2cfeab700f8c3c893f08d1a60d3f75e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20K=C3=B6rper?= Date: Tue, 8 Jan 2013 11:51:53 +0100 Subject: bugfix: compile errors in im3195 --- ChangeLog | 2 ++ plugins/im3195/im3195.c | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f1e2ab73..744110df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,6 +18,8 @@ Version 7.2.5 [v7-stable] 2013-01-?? closes: http://bugzilla.adiscon.com/show_bug.cgi?id=394 Thanks to David Hill for the patch [under ASL2.0 as per email conversation 2013-01-03]. +- bugfix: compile errors in im3195 + Thanks to Martin Körper for the patch ---------------------------------------------------------------------------- Version 7.2.4 [v7-stable] 2012-12-07 - enhance: permit RFC3339 timestamp in local log socket messages diff --git a/plugins/im3195/im3195.c b/plugins/im3195/im3195.c index c75e0e34..4b04b124 100644 --- a/plugins/im3195/im3195.c +++ b/plugins/im3195/im3195.c @@ -48,6 +48,7 @@ #include "cfsysline.h" #include "msg.h" #include "errmsg.h" +#include "unicode-helper.h" MODULE_TYPE_INPUT MODULE_TYPE_NOKEEP @@ -56,6 +57,7 @@ MODULE_CNFNAME("im3195") /* Module static data */ DEF_IMOD_STATIC_DATA DEFobjCurrIf(errmsg) +DEFobjCurrIf(prop) /* configuration settings */ @@ -71,6 +73,8 @@ static int listenPort = 601; */ static srAPIObj* pAPI; +static prop_t *pInputName = NULL; /* there is only one global inputName for all messages generated by this module */ + /* This method is called when a message has been fully received. * It passes the received message to the rsyslog main message @@ -90,7 +94,7 @@ void OnReceive(srAPIObj __attribute__((unused)) *pMyAPI, srSLMGObj* pSLMG) srSLMGGetRawMSG(pSLMG, &pszRawMsg); parseAndSubmitMessage(fromHost, fromHostIP, pszRawMsg, strlen((char*)pszRawMsg), - PARSE_HOSTNAME, eFLOWCTL_FULL_DELAY, (uchar*)"im3195", NULL, 0, NULL); + PARSE_HOSTNAME, eFLOWCTL_FULL_DELAY, pInputName, NULL, 0, NULL); } @@ -171,6 +175,9 @@ ENDafterRun BEGINmodExit CODESTARTmodExit srAPIExitLib(pAPI); /* terminate liblogging */ + /* global variable cleanup */ + if(pInputName != NULL) + prop.Destruct(&pInputName); /* release objects we used */ objRelease(errmsg, CORE_COMPONENT); ENDmodExit @@ -193,9 +200,15 @@ CODESTARTmodInit *ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */ CODEmodInit_QueryRegCFSLineHdlr CHKiRet(objUse(errmsg, CORE_COMPONENT)); + CHKiRet(objUse(prop, CORE_COMPONENT)); CHKiRet(omsdRegCFSLineHdlr((uchar *)"input3195listenport", 0, eCmdHdlrInt, NULL, &listenPort, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr((uchar *)"resetconfigvariables", 1, eCmdHdlrCustomHandler, resetConfigVariables, NULL, STD_LOADABLE_MODULE_ID)); + + CHKiRet(prop.Construct(&pInputName)); + CHKiRet(prop.SetString(pInputName, UCHAR_CONSTANT("im3195"), sizeof("im3195") - 1)); + CHKiRet(prop.ConstructFinalize(pInputName)); + ENDmodInit /* vim:set ai: */ -- cgit v1.2.3 From 3b0f635bd579c4cc00e189871e77ef120a6c6a4d Mon Sep 17 00:00:00 2001 From: Chandler Latour Date: Tue, 8 Jan 2013 12:01:10 +0100 Subject: bugfix: doGetFileCreateMode() had invalid validity check ;) --- ChangeLog | 2 ++ grammar/rainerscript.c | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 744110df..792a8d53 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,8 @@ Version 7.2.5 [v7-stable] 2013-01-?? 2013-01-03]. - bugfix: compile errors in im3195 Thanks to Martin Körper for the patch +- bugfix: doGetFileCreateMode() had invalid validity check ;) + Thanks to Chandler Latour for the patch. ---------------------------------------------------------------------------- Version 7.2.4 [v7-stable] 2012-12-07 - enhance: permit RFC3339 timestamp in local log socket messages diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c index c5f2148e..0584d6a9 100644 --- a/grammar/rainerscript.c +++ b/grammar/rainerscript.c @@ -463,17 +463,17 @@ doGetFileCreateMode(struct nvlst *valnode, struct cnfparamdescr *param, if(es_strlen(valnode->val.d.estr) == 4) { c = es_getBufAddr(valnode->val.d.estr); - if(!( (c[0] == '0') - && (c[1] >= '0' && c[1] <= '7') - && (c[2] >= '0' && c[2] <= '7') - && (c[3] >= '0' && c[3] <= '7') ) ) { + if( (c[0] == '0') + && (c[1] >= '0' && c[1] <= '7') + && (c[2] >= '0' && c[2] <= '7') + && (c[3] >= '0' && c[3] <= '7') ) { fmtOK = 1; } } if(fmtOK) { val->val.datatype = 'N'; - val->val.d.n = (c[1]-'0') * 64 + (c[2]-'0') * 8 + (c[3]-'0');; + val->val.d.n = (c[1]-'0') * 64 + (c[2]-'0') * 8 + (c[3]-'0'); } else { cstr = es_str2cstr(valnode->val.d.estr, NULL); parser_errmsg("file modes need to be specified as " -- cgit v1.2.3 From bbb2066d17824f366d0f83a010cae6ebe99d4fa0 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 8 Jan 2013 12:49:02 +0100 Subject: bugfix: mmjsonparse errornously returned action error when no CEE cookie was present. --- ChangeLog | 2 ++ plugins/mmjsonparse/mmjsonparse.c | 1 + 2 files changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 792a8d53..12db54e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,8 @@ Version 7.2.5 [v7-stable] 2013-01-?? Thanks to Martin Körper for the patch - bugfix: doGetFileCreateMode() had invalid validity check ;) Thanks to Chandler Latour for the patch. +- bugfix: mmjsonparse errornously returned action error when no CEE cookie + was present. ---------------------------------------------------------------------------- Version 7.2.4 [v7-stable] 2012-12-07 - enhance: permit RFC3339 timestamp in local log socket messages diff --git a/plugins/mmjsonparse/mmjsonparse.c b/plugins/mmjsonparse/mmjsonparse.c index 40cfa919..a13962ab 100644 --- a/plugins/mmjsonparse/mmjsonparse.c +++ b/plugins/mmjsonparse/mmjsonparse.c @@ -172,6 +172,7 @@ finalize_it: jval = json_object_new_string((char*)buf); json_object_object_add(json, "msg", jval); msgAddJSON(pMsg, (uchar*)"!", json); + iRet = RS_RET_OK; } MsgSetParseSuccess(pMsg, bSuccess); ENDdoAction -- cgit v1.2.3 From 18fe66d9e0dbebc0c05379d2d53c50eab37f184d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20K=C3=B6rper?= Date: Tue, 8 Jan 2013 14:42:54 +0100 Subject: im3195: object was not freed on exit [ASL2.0] This and the other patch from Martin (this morning) was released under ASL 2.0 by him. --- plugins/im3195/im3195.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/im3195/im3195.c b/plugins/im3195/im3195.c index 4b04b124..b8a4a140 100644 --- a/plugins/im3195/im3195.c +++ b/plugins/im3195/im3195.c @@ -180,6 +180,7 @@ CODESTARTmodExit prop.Destruct(&pInputName); /* release objects we used */ objRelease(errmsg, CORE_COMPONENT); + objRelease(prop, CORE_COMPONENT); ENDmodExit -- cgit v1.2.3 From 55d6eef1be47df7312e8e59a64ad9b0de6298f2f Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 8 Jan 2013 15:26:32 +0100 Subject: prepare for 7.2.5 release --- ChangeLog | 2 +- configure.ac | 2 +- doc/manual.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 12db54e9..df32f47e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,5 @@ ---------------------------------------------------------------------------- -Version 7.2.5 [v7-stable] 2013-01-?? +Version 7.2.5 [v7-stable] 2013-01-08 - build system cleanup (thanks to Michael Biebl for this!) - bugfix: omelasticsearch did not properly compile on some platforms due to missing libmath. Thanks to Michael Biebl for the fix diff --git a/configure.ac b/configure.ac index 70e89d4d..14a33c6c 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.2.4],[rsyslog@lists.adiscon.com]) +AC_INIT([rsyslog],[7.2.5],[rsyslog@lists.adiscon.com]) AM_INIT_AUTOMAKE m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) diff --git a/doc/manual.html b/doc/manual.html index bddac9c0..1bf537f0 100644 --- a/doc/manual.html +++ b/doc/manual.html @@ -19,7 +19,7 @@ rsyslog support available directly from the source!

Please visit the rsyslog sponsor's page to honor the project sponsors or become one yourself! We are very grateful for any help towards the project goals.

-

This documentation is for version 7.2.4 (v7-stable branch) of rsyslog. +

This documentation is for version 7.2.5 (v7-stable branch) of rsyslog. Visit the rsyslog status page to obtain current version information and project status.

If you like rsyslog, you might -- cgit v1.2.3