Package: libunix-syslog-perl
Version: 0.100-4
Severity: important
Tags: patch


Sys:Syslog perl module appends \0 character to each line before sending
it to syslog. Consequently each line in logfile which is logged with
this interface (via syslog-ng 1.6.5-2.2 in my case) has \0 character
appended at the end. The result is quite annoying while trying to
analyse logfiles using eg. grep which prints: "Binary file mail.log
matches" insteaf of matching lines. The Sys:Syslog interface is used eg.
by spamd, pop-before-smtp and others thus it is rather importatnt issue
on my system.

Bellow I attach the patch which removes this problem. However it is not
well tested, I don't know if it causes other problems and why the \0
character was appended to the log line.

--- Sys/Syslog.pm.orig  2005-12-29 13:12:33.000000000 +0100
+++ Sys/Syslog.pm       2005-12-29 13:15:20.000000000 +0100
@@ -312,7 +312,7 @@
     $message = sprintf ($mask, @_);

     $sum = $numpri + $numfac;
-    my $buf = "<$sum>$whoami: $message\0";
+    my $buf = "<$sum>$whoami: $message";

     # it's possible that we'll get an error from sending
     # (e.g. if method is UDP and there is no UDP listener,



-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.4.31-grsec-pom-imq
Locale: LANG=pl_PL, LC_CTYPE=pl_PL (charmap=ISO-8859-2)

Versions of packages libunix-syslog-perl depends on:
ii  libc6                       2.3.2.ds1-22 GNU C Library: Shared libraries an
ii  perl                        5.8.4-8      Larry Wall's Practical Extraction 
ii  perl-base [perlapi-5.8.4]   5.8.4-8      The Pathologically Eclectic Rubbis

-- no debconf information

          


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to