Package: util-linux
Version: 2.20.1-5.1
Severity: important
Tags: patch

Moin,

logger can send syslog messages to remote server using the -n switch.
Unfortunately this does not work because the handling of the switch
is incomplete.

The following simple patch fixes this:

diff -ur util-linux-2.20.1-orig/misc-utils/logger.c 
util-linux-2.20.1/misc-utils/logger.c
--- util-linux-2.20.1-orig/misc-utils/logger.c  2011-10-18 07:41:47.000000000 
+0200
+++ util-linux-2.20.1/misc-utils/logger.c       2012-08-08 09:35:56.903618217 
+0200
@@ -281,7 +281,7 @@
                        }
                }
                if (p != buf) {
-                   if (!usock)
+                   if (!usock && !udpserver)
                        syslog(pri, "%s", buf);
                    else
                        mysyslog(LogSock, logflags, pri, tag, buf);
@@ -295,13 +295,13 @@
                    if (len > 0 && buf[len - 1] == '\n')
                            buf[len - 1] = '\0';
 
-                   if (!usock)
+                   if (!usock && !udpserver)
                        syslog(pri, "%s", buf);
                    else
                        mysyslog(LogSock, logflags, pri, tag, buf);
                }
        }
-       if (!usock)
+       if (!usock && !udpserver)
                closelog();
        else
                close(LogSock);


                        Attila Kinali

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-2-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages util-linux depends on:
ii  debconf [debconf-2.0]  1.5.44
ii  dpkg                   1.16.4.3
ii  initscripts            2.88dsf-22.1
ii  install-info           4.13a.dfsg.1-10
ii  libblkid1              2.20.1-5.1
ii  libc6                  2.13-33
ii  libncurses5            5.9-10
ii  libselinux1            2.1.9-5
ii  libslang2              2.2.4-15
ii  libtinfo5              5.9-10
ii  libuuid1               2.20.1-5.1
ii  lsb-base               4.1+Debian7
ii  tzdata                 2012c-1
ii  zlib1g                 1:1.2.7.dfsg-13

util-linux recommends no packages.

Versions of packages util-linux suggests:
ii  dosfstools          3.0.13-1
ii  kbd                 1.15.3-9
pn  util-linux-locales  <none>

-- debconf information excluded


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to