diff --git a/rsyslog-1.19.6-dropNul.patch b/rsyslog-1.19.6-dropNul.patch new file mode 100644 index 0000000..d52aade --- /dev/null +++ b/rsyslog-1.19.6-dropNul.patch @@ -0,0 +1,22 @@ +--- syslogd.c.dropNul 2007-10-03 17:38:07.000000000 +0200 ++++ syslogd.c 2007-10-03 17:43:23.000000000 +0200 +@@ -2023,13 +2023,18 @@ void printchopped(char *hname, char *msg + + dbgprintf("Message length: %d, File descriptor: %d.\n", len, fd); + ++ if(*(msg + len - 1) == '\0') { ++ dbgprintf("dropped NUL at very end of message\n"); ++ len--; ++ } ++ + /* we first check if we need to drop trailing LFs, which often make + * their way into syslog messages unintentionally. In order to remain + * compatible to recent IETF developments, we allow the user to + * turn on/off this handling. rgerhards, 2007-07-23 + */ + if(bDropTrailingLF && *(msg + len - 1) == '\n') { +- *(msg + len - 1) = '\0'; ++ dbgprintf("dropped LF at very end of message (DropTrailingLF is set)\n"); + len--; + } + diff --git a/rsyslog.spec b/rsyslog.spec index e024573..c9504c6 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -3,7 +3,7 @@ Summary: Enhanced system logging and kernel message trapping daemons Name: rsyslog Version: 1.19.6 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.rsyslog.com/ @@ -11,6 +11,7 @@ Source0: http://download.adiscon.com/rsyslog/%{name}-%{version}.tar.gz Source1: rsyslog.init Source2: rsyslog.sysconfig Patch1: rsyslog-1.19.6-repmsg.patch +Patch2: rsyslog-1.19.6-dropNul.patch Conflicts: logrotate < 3.5.2 BuildRequires: zlib-devel BuildRequires: autoconf automake @@ -47,6 +48,7 @@ MySQL database support to rsyslog. %prep %setup -q %patch1 -p1 -b .repmsg +%patch2 -p0 -b .dropnul %build %configure --sbindir=%{sbindir} --disable-static @@ -119,6 +121,9 @@ fi %{_libdir}/rsyslog/ommysql.so %changelog +* Wed Oct 03 2007 Peter Vrabec 1.19.6-3 +- remove NUL character from recieved messages + * Tue Sep 25 2007 Tomas Heinrich 1.19.6-2 - fix message suppression (303341)