summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-02-21 09:10:45 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2011-02-21 09:10:45 +0100
commit026f59388a105597c3c6890bb0c83652cb712903 (patch)
treeacd0eb16d56471a85818cc66cd0485334e74172b
parent4d35185317fd03e2a820013e7ab3ca5c760db670 (diff)
downloadrsyslog-026f59388a105597c3c6890bb0c83652cb712903.tar.gz
rsyslog-026f59388a105597c3c6890bb0c83652cb712903.tar.xz
rsyslog-026f59388a105597c3c6890bb0c83652cb712903.zip
bugfix: imuxsock did no longer remove trailing LF
This was a regression from the imuxsock partial rewrite. Happened because the message is no longer run through the standard parsers. Now imuxsock does this sanitization itself. bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=224
-rw-r--r--ChangeLog5
-rw-r--r--plugins/imuxsock/imuxsock.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d502ce35..71e6f3ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,11 @@ Version 5.7.5 [V5-BETA] (rgerhards), 2011-02-??
we do this directly in the beta because a) it does not affect existing
functionality and b) one may argue that this missing functionality is
close to a bug.
+- bugfix: imuxsock did no longer remove trailing LF
+ This was a regression from the imuxsock partial rewrite. Happened
+ because the message is no longer run through the standard parsers.
+ Now imuxsock does this sanitization itself.
+ bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=224
- bugfix: minor race condition in action.c - considered cosmetic
This is considered cosmetic as multiple threads tried to write exactly
the same value into the same memory location without sync. The method
diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c
index 75f97db4..136e4196 100644
--- a/plugins/imuxsock/imuxsock.c
+++ b/plugins/imuxsock/imuxsock.c
@@ -517,6 +517,10 @@ SubmitMsg(uchar *pRcv, int lenRcv, lstn_t *pLstn, struct ucred *cred)
* rate-limiting as well.
*/
parse = pRcv;
+ if(pRcv[lenRcv-1] = '\n') {
+ DBGPRINTF("imuxsock: found trailing LF, removing\n");
+ lenRcv--;
+ }
lenMsg = lenRcv;
parse++; lenMsg--; /* '<' */