Package: mon
Version: 1.2.0-1
Severity: important
Tags: patch

I recently noticed that mon no longer generates any syslog output.  This 
renders it useless to me as I alert based on those syslog events.  When 
printing out $@ after the eval in syslog() I found it complained about 
modifying @_, and s// returns if the replacement succeeds opposed to the 
new string.  Patch attached.

-- System Information:
Debian Release: 6.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.33.2 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages mon depends on:
ii  adduser                       3.112+nmu2 add and remove users and groups
ii  libc6                         2.11.2-10  Embedded GNU C Library: Shared lib
ii  libtime-period-perl           1.20-8     Perl library for testing if a time
ii  mon-client                    1.2.0-1    modules for interfacing with the m

Versions of packages mon recommends:
ii  fping                 2.4b2-to-ipv6-16.1 sends ICMP ECHO_REQUEST packets to
pn  libauthen-pam-perl    <none>             (no description available)
pn  libcrypt-ssleay-perl  <none>             (no description available)
ii  libfilesys-diskspace- 0.05-13            fetch filesystem size and usage in
ii  libnet-dns-perl       0.66-2             Perform DNS queries from a Perl sc
pn  libnet-ldap-perl      <none>             (no description available)
ii  libnet-telnet-perl    3.03-3             Script telnetable connections
ii  libsnmp-perl          5.4.3~dfsg-2       SNMP (Simple Network Management Pr
ii  libstatistics-descrip 3.0201-1           Perl module for basic descriptive 
pn  libtime-modules-perl  <none>             (no description available)
ii  perl-modules [libnet- 5.10.1-17          Core Perl modules

mon suggests no packages.

-- Configuration Files:
/etc/default/mon changed [not included]
/etc/mon/auth.cf changed [not included]
/etc/mon/mon.cf [Errno 2] No such file or directory: u'/etc/mon/mon.cf'

-- no debconf information
--- a/mon       2011-02-01 14:13:05.425802661 -0500
+++ b/mon       2011-02-01 14:17:43.814709129 -0500
@@ -5392,9 +5392,10 @@
 
 no warnings; # Redefining syslog
 sub syslog {
+   my @args = @_;
    eval {
        local $SIG{"__DIE__"}= sub { }; 
-       my @log = map { s/\%//mg; } @_;
+       my @log = map { s/\%//mg; $_ } @args;
        Sys::Syslog::syslog(@log);
    }
 }

Reply via email to