Scott Moser has proposed merging lp:~smoser/ubuntu/precise/rsyslog/lp905419 
into lp:ubuntu/rsyslog.

Requested reviews:
  Ubuntu Server Team (ubuntu-server)
Related bugs:
  Bug #905419 in rsyslog (Ubuntu): "messages to rsyslog without timestamp lose 
16 chars"
  https://bugs.launchpad.net/ubuntu/+source/rsyslog/+bug/905419

For more details, see:
https://code.launchpad.net/~smoser/ubuntu/precise/rsyslog/lp905419/+merge/86429
-- 
https://code.launchpad.net/~smoser/ubuntu/precise/rsyslog/lp905419/+merge/86429
Your team Ubuntu Server Team is requested to review the proposed merge of 
lp:~smoser/ubuntu/precise/rsyslog/lp905419 into lp:ubuntu/rsyslog.
=== modified file '.pc/applied-patches'
--- .pc/applied-patches	2011-11-07 13:54:56 +0000
+++ .pc/applied-patches	2011-12-20 16:43:34 +0000
@@ -1,1 +1,2 @@
 01-dont_create_db.patch
+100-imuxsock-allow-missing-date.patch

=== modified file 'debian/changelog'
--- debian/changelog	2011-12-02 17:39:39 +0000
+++ debian/changelog	2011-12-20 16:43:34 +0000
@@ -1,3 +1,11 @@
+rsyslog (5.8.6-1ubuntu4) UNRELEASED; urgency=low
+
+  * debian/patches/100-imuxsock-allow-missing-date.patch
+    fix bug in imuxsock that truncated messages if they did not
+    contain a date field (LP: #905419).
+
+ -- Scott Moser <smo...@ubuntu.com>  Tue, 20 Dec 2011 11:07:16 -0500
+
 rsyslog (5.8.6-1ubuntu3) precise; urgency=low
 
   * No-change rebuild to drop spurious libsfgcc1 dependency on armhf.

=== added file 'debian/patches/100-imuxsock-allow-missing-date.patch'
--- debian/patches/100-imuxsock-allow-missing-date.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/100-imuxsock-allow-missing-date.patch	2011-12-20 16:43:34 +0000
@@ -0,0 +1,34 @@
+From: Rainer Gerhards <rgerha...@adiscon.com>
+Date: Tue, 20 Dec 2011 15:39:39 +0000 (+0100)
+Subject: bugfix: imuxsock did truncate part of received message if it did not contain a proper... 
+X-Git-Url: http://git.adiscon.com/?p=rsyslog.git;a=commitdiff_plain;h=f112b51b8d6c358b87ac608112d393adb047ea0f
+
+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
+
+Origin: upstream, http://git.adiscon.com/?p=rsyslog.git;a=commitdiff_plain;h=f112b51b8d6c358b87ac608112d393adb047ea0f
+Bug: http://bugzilla.adiscon.com/show_bug.cgi?id=295
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/rsyslog/+bug/905419
+---
+
+diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c
+index 2697c48..feddb20 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");

=== modified file 'debian/patches/series'
--- debian/patches/series	2011-11-07 13:54:56 +0000
+++ debian/patches/series	2011-12-20 16:43:34 +0000
@@ -1,2 +1,4 @@
 # Debian patches for rsyslog
 01-dont_create_db.patch
+# Ubuntu patches for rsyslog
+100-imuxsock-allow-missing-date.patch

=== modified file 'plugins/imuxsock/imuxsock.c'
--- plugins/imuxsock/imuxsock.c	2011-11-02 23:31:41 +0000
+++ plugins/imuxsock/imuxsock.c	2011-12-20 16:43:34 +0000
@@ -565,8 +565,11 @@
 	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");

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to