[syslog-ng] [Bug 124] [regression] broken $FULLHOST after upgrade to 3.2.4

bugzilla at bugzilla.balabit.com bugzilla at bugzilla.balabit.com
Mon Jun 27 09:50:53 CEST 2011


https://bugzilla.balabit.com/show_bug.cgi?id=124


Balazs Scheidler <bazsi at balabit.hu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|                            |FIXED
             Status|NEW                         |RESOLVED




--- Comment #2 from Balazs Scheidler <bazsi at balabit.hu>  2011-06-27 09:50:51 ---
(In reply to comment #0)
> syslog-ng 3.2.4 sets the chained hostname from local sources always
> to 'hostname/hostname'.  Previous version (2.x and 3.1.4) used
> 'localhost at hostname' for this resp. '<sourcename>@hostname'.
> 
> 

Indeed, this was broken. syslog-ng didn't properly mark locally received 
messages as such, so the host name mangling rules applied were the ones 
that gets applied to network received messages.

Thanks for the report, this patch fixes it for me (against 3.2):

commit 2db971fc37471e39f6a8b34595ca23833166831e
Author: Balazs Scheidler <bazsi at balabit.hu>
Date:   Mon Jun 27 09:47:51 2011 +0200

    fixed chain-hostnames() processing

    The marking of local messages was broken, and as a result hostnames generated
    by chain-hostnames(yes) got also broken: instead of <source>@<hostname>
    <hostname>/<hostname> got generated.

    Reported-By: Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
    Signed-off-by: Balazs Scheidler <bazsi at balabit.hu>

diff --git a/lib/logreader.c b/lib/logreader.c
index 7508abf..400668a 100644
--- a/lib/logreader.c
+++ b/lib/logreader.c
@@ -280,6 +280,9 @@ log_reader_handle_line(LogReader *self, const guchar *line, gint length, GSockAd
   m = log_msg_new((gchar *) line, length,
                   saddr,
                   &self->options->parse_options);
+
+  if (self->options->flags & LR_LOCAL)
+    m->flags |= LF_LOCAL;

   if (!m->saddr && self->peer_addr)
     {


-- 
Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the syslog-ng mailing list