diff options
author | Andre Lorbach <alorbach@adiscon.com> | 2011-08-16 11:01:41 +0200 |
---|---|---|
committer | Andre Lorbach <alorbach@adiscon.com> | 2011-08-16 11:01:41 +0200 |
commit | 803462104b4eb319c05ea0f6e30c0b04548a1ed0 (patch) | |
tree | 994e92fbcb18fa858ac712fd2219cfa57a9e51c7 | |
parent | 1b9a4f303bd3e0cb899788e1a8908ea60e23eadd (diff) | |
parent | 33bf53cdab0689bd7f100aca5f09dd6b69da0e94 (diff) | |
download | rsyslog-803462104b4eb319c05ea0f6e30c0b04548a1ed0.tar.gz rsyslog-803462104b4eb319c05ea0f6e30c0b04548a1ed0.tar.xz rsyslog-803462104b4eb319c05ea0f6e30c0b04548a1ed0.zip |
Merge branch 'v5-stable' into v5-devel
Conflicts:
ChangeLog
configure.ac
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | doc/rsyslog_pgsql.html | 4 | ||||
-rw-r--r-- | runtime/msg.c | 12 | ||||
-rw-r--r-- | tools/pmrfc3164.c | 2 |
5 files changed, 18 insertions, 6 deletions
@@ -80,7 +80,9 @@ Version 5.9.0 [V5-DEVEL] (rgerhards), 2011-06-08 affected directive was: $ActionExecOnlyWhenPreviousIsSuspended on closes: http://bugzilla.adiscon.com/show_bug.cgi?id=236 --------------------------------------------------------------------------- -Version 5.8.5 [V5-stable] (al), 2011-??-?? +Version 5.8.5 [V5-stable] (rgerhards/al), 2011-??-?? +- bugfix: potential hang condition during tag emulation +- bugfix: too-early string termination during tag emulation - bugfix: The NUL-Byte for the syslogtag was not copied in MsgDup (msg.c) --------------------------------------------------------------------------- Version 5.8.4 [V5-stable] (al), 2011-08-10 diff --git a/configure.ac b/configure.ac index 1dd876ac..023a447c 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],[5.9.2],[rsyslog@lists.adiscon.com]) +AC_INIT([rsyslog],[5.9.3-pre1],[rsyslog@lists.adiscon.com]) AM_INIT_AUTOMAKE m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) diff --git a/doc/rsyslog_pgsql.html b/doc/rsyslog_pgsql.html index dcb9dc3a..21516ec8 100644 --- a/doc/rsyslog_pgsql.html +++ b/doc/rsyslog_pgsql.html @@ -30,7 +30,7 @@ --> </STYLE> </HEAD> -<BODY LANG="de-DE" DIR="LTR"> +<BODY> <H1 CLASS="western"><SPAN LANG="en-US">Writing </SPAN>syslog messages to MySQL, PostgreSQL or any other supported Database</H1> <P CLASS="western"><FONT SIZE=2><I>Written by </I></FONT><A HREF="http://www.adiscon.com/en/people/rainer-gerhards.php"><FONT SIZE=2><I>Rainer @@ -333,4 +333,4 @@ Gerhards</A>, Marc Schiffbauer and <A HREF="http://www.adiscon.com/en/">Adiscon< <P CLASS="western"><BR><BR> </P> </BODY> -</HTML>
\ No newline at end of file +</HTML> diff --git a/runtime/msg.c b/runtime/msg.c index 9fdaded3..f1de8130 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -1661,6 +1661,8 @@ void MsgSetTAG(msg_t *pMsg, uchar* pszBuf, size_t lenBuf) uchar *pBuf; assert(pMsg != NULL); +dbgprintf("MsgSetTAG in: len %d, pszBuf: %s\n", lenBuf, pszBuf); + freeTAG(pMsg); pMsg->iLenTAG = lenBuf; @@ -1679,6 +1681,8 @@ void MsgSetTAG(msg_t *pMsg, uchar* pszBuf, size_t lenBuf) memcpy(pBuf, pszBuf, pMsg->iLenTAG); pBuf[pMsg->iLenTAG] = '\0'; /* this also works with truncation! */ + +dbgprintf("MsgSetTAG exit: pMsg->iLenTAG %d, pMsg->TAG.szBuf: %s\n", pMsg->iLenTAG, pMsg->TAG.szBuf); } @@ -1697,8 +1701,11 @@ static inline void tryEmulateTAG(msg_t *pM, sbool bLockMutex) if(bLockMutex == LOCK_MUTEX) MsgLock(pM); - if(pM->iLenTAG > 0) + if(pM->iLenTAG > 0) { + if(bLockMutex == LOCK_MUTEX) + MsgUnlock(pM); return; /* done, no need to emulate */ + } if(getProtocolVersion(pM) == 1) { if(!strcmp(getPROCID(pM, MUTEX_ALREADY_LOCKED), "-")) { @@ -1708,7 +1715,7 @@ static inline void tryEmulateTAG(msg_t *pM, sbool bLockMutex) /* now we can try to emulate */ lenTAG = snprintf((char*)bufTAG, CONF_TAG_MAXSIZE, "%s[%s]", getAPPNAME(pM, MUTEX_ALREADY_LOCKED), getPROCID(pM, MUTEX_ALREADY_LOCKED)); - bufTAG[32] = '\0'; /* just to make sure... */ + bufTAG[sizeof(bufTAG)-1] = '\0'; /* just to make sure... */ MsgSetTAG(pM, bufTAG, lenTAG); } } @@ -1734,6 +1741,7 @@ getTAG(msg_t *pM, uchar **ppBuf, int *piLen) *piLen = pM->iLenTAG; } } +dbgprintf("getTAG: len %d, buf '%s'\n", *piLen, *ppBuf); } diff --git a/tools/pmrfc3164.c b/tools/pmrfc3164.c index 635ca985..d56e53f0 100644 --- a/tools/pmrfc3164.c +++ b/tools/pmrfc3164.c @@ -176,6 +176,7 @@ CODESTARTparse * in RFC3164...). We now receive the full size, but will modify the * outputs so that only 32 characters max are used by default. */ +dbgprintf("pmrfc3164:tag:in: lenMsg %d, p2parse: '%s'\n", lenMsg, p2parse); i = 0; while(lenMsg > 0 && *p2parse != ':' && *p2parse != ' ' && i < CONF_TAG_MAXSIZE) { bufParseTAG[i++] = *p2parse++; @@ -191,6 +192,7 @@ CODESTARTparse * is considered OK. So we do not need to check for empty TAG. -- rgerhards, 2009-06-23 */ bufParseTAG[i] = '\0'; /* terminate string */ +dbgprintf("pmrfc3164:tag:done: lenMsg %d, i %d, bufParseTAG: '%s'\n", lenMsg, i, bufParseTAG); MsgSetTAG(pMsg, bufParseTAG, i); } else {/* we enter this code area when the user has instructed rsyslog NOT * to parse HOSTNAME and TAG - rgerhards, 2006-03-13 |