summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-01-09 15:07:02 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2012-01-09 15:07:02 +0100
commit1414dacae03c90c1ab83c04227474ecac7d40c76 (patch)
tree287761f728e2e84aaec118e7664495dd5d196b04
parent5c0cff0e5a3a1a00b6176af7e4fefbdc5af8f9a3 (diff)
parent791b16ce06d75944e338a6e5fa14c0394bde6f1d (diff)
downloadrsyslog-1414dacae03c90c1ab83c04227474ecac7d40c76.tar.gz
rsyslog-1414dacae03c90c1ab83c04227474ecac7d40c76.tar.xz
rsyslog-1414dacae03c90c1ab83c04227474ecac7d40c76.zip
Merge branch 'v5-stable' into v6-stable
-rw-r--r--ChangeLog7
-rw-r--r--plugins/imuxsock/imuxsock.c7
-rw-r--r--runtime/msg.c10
-rw-r--r--runtime/statsobj.c2
4 files changed, 19 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 3adb4447..480c3994 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -246,9 +246,16 @@ Version 5.9.0 [V5-DEVEL] (rgerhards), 2011-03-??
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=236
---------------------------------------------------------------------------
Version 5.8.7 [V5-stable] 2011-??-??
+- bugfix: instabilities when using RFC5424 header fields
+ Thanks to Kaiwang Chen for the patch
+- bugfix: imuxsock did truncate part of received message if it did not
+ contain a proper date. The truncation occured because we removed that
+ part of the messages that was expected to be the date.
+ closes: http://bugzilla.adiscon.com/show_bug.cgi?id=295
- bugfix: potential abort after reading invalid X.509 certificate
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=290
Thanks to Tomas Heinrich for the patch
+- bugfix: stats counter were not properly initialized on creation
---------------------------------------------------------------------------
Version 5.8.6 [V5-stable] 2011-10-21
- bugfix: missing whitespace after property-based filter was not detected
diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c
index b3007d19..3df52d75 100644
--- a/plugins/imuxsock/imuxsock.c
+++ b/plugins/imuxsock/imuxsock.c
@@ -565,8 +565,11 @@ SubmitMsg(uchar *pRcv, int lenRcv, lstn_t *pLstn, struct ucred *cred)
parse++; lenMsg--; /* '>' */
if((pLstn->flags & IGNDATE)) {
- parse += 16; /* just skip timestamp */
- lenMsg -= 16;
+ /* in this case, we still need to find out if we have a valid
+ * datestamp or not .. and advance the parse pointer accordingly.
+ */
+ struct syslogTime dummy;
+ datetime.ParseTIMESTAMP3164(&dummy, &parse, &lenMsg);
} else {
if(datetime.ParseTIMESTAMP3164(&(pMsg->tTIMESTAMP), &parse, &lenMsg) != RS_RET_OK) {
DBGPRINTF("we have a problem, invalid timestamp in msg!\n");
diff --git a/runtime/msg.c b/runtime/msg.c
index 9cafbf7b..a52d0cce 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -7,7 +7,7 @@
* of the "old" message code without any modifications. However, it
* helps to have things at the right place one we go to the meat of it.
*
- * Copyright 2007, 2008 Rainer Gerhards and Adiscon GmbH.
+ * Copyright 2007-2012 Rainer Gerhards and Adiscon GmbH.
*
* This file is part of the rsyslog runtime library.
*
@@ -1621,7 +1621,7 @@ char *getPROCID(msg_t *pM, sbool bLockMutex)
ISOBJ_TYPE_assert(pM, msg);
if(bLockMutex == LOCK_MUTEX)
- MsgUnlock(pM);
+ MsgLock(pM);
preparePROCID(pM, MUTEX_ALREADY_LOCKED);
if(pM->pCSPROCID == NULL)
pszRet = UCHAR_CONSTANT("");
@@ -1858,7 +1858,7 @@ static inline char *getStructuredData(msg_t *pM)
{
uchar *pszRet;
- MsgUnlock(pM);
+ MsgLock(pM);
if(pM->pCSStrucData == NULL)
pszRet = UCHAR_CONSTANT("-");
else
@@ -1906,7 +1906,7 @@ uchar *getProgramName(msg_t *pM, sbool bLockMutex)
uchar *pszRet;
if(bLockMutex == LOCK_MUTEX)
- MsgUnlock(pM);
+ MsgLock(pM);
prepareProgramName(pM, MUTEX_ALREADY_LOCKED);
if(pM->pCSProgName == NULL)
pszRet = UCHAR_CONSTANT("");
@@ -1964,7 +1964,7 @@ char *getAPPNAME(msg_t *pM, sbool bLockMutex)
assert(pM != NULL);
if(bLockMutex == LOCK_MUTEX)
- MsgUnlock(pM);
+ MsgLock(pM);
prepareAPPNAME(pM, MUTEX_ALREADY_LOCKED);
if(pM->pCSAPPNAME == NULL)
pszRet = UCHAR_CONSTANT("");
diff --git a/runtime/statsobj.c b/runtime/statsobj.c
index e1a89cf4..131605e0 100644
--- a/runtime/statsobj.c
+++ b/runtime/statsobj.c
@@ -154,9 +154,11 @@ addCounter(statsobj_t *pThis, uchar *ctrName, statsCtrType_t ctrType, void *pCtr
switch(ctrType) {
case ctrType_IntCtr:
ctr->val.pIntCtr = (intctr_t*) pCtr;
+ *(ctr->val.pIntCtr) = 0;
break;
case ctrType_Int:
ctr->val.pInt = (int*) pCtr;
+ *(ctr->val.pInt) = 0;
break;
}
addCtrToList(pThis, ctr);