Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/syslogd Use looked up remote host for remote messag...



details:   https://anonhg.NetBSD.org/src/rev/89590404ec96
branches:  trunk
changeset: 356225:89590404ec96
user:      ginsbach <ginsbach%NetBSD.org@localhost>
date:      Sun Sep 10 17:01:07 2017 +0000

description:
Use looked up remote host for remote message without a hostname

An incoming remote message may not necessarily have a hostname
between the timestamp and the message. The the source of the remote
sender is already looked up so use that hostname/IP address rather
than the local hostname.

XXX: pullup-8
XXX: pullup-7
XXX: pullup-6

diffstat:

 usr.sbin/syslogd/syslogd.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 61999dfab9e9 -r 89590404ec96 usr.sbin/syslogd/syslogd.c
--- a/usr.sbin/syslogd/syslogd.c        Sun Sep 10 10:51:13 2017 +0000
+++ b/usr.sbin/syslogd/syslogd.c        Sun Sep 10 17:01:07 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: syslogd.c,v 1.123 2016/06/11 16:55:10 christos Exp $   */
+/*     $NetBSD: syslogd.c,v 1.124 2017/09/10 17:01:07 ginsbach Exp $   */
 
 /*
  * Copyright (c) 1983, 1988, 1993, 1994
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)syslogd.c  8.3 (Berkeley) 4/4/94";
 #else
-__RCSID("$NetBSD: syslogd.c,v 1.123 2016/06/11 16:55:10 christos Exp $");
+__RCSID("$NetBSD: syslogd.c,v 1.124 2017/09/10 17:01:07 ginsbach Exp $");
 #endif
 #endif /* not lint */
 
@@ -1277,7 +1277,7 @@
                } else if (*p == '[' || (*p == ':'
                        && (*(p+1) == ' ' || *(p+1) == '\0'))) {
                        /* no host in message */
-                       buffer->host = LocalFQDN;
+                       buffer->host = strdup(hname);
                        buffer->prog = strndup(start, p - start);
                        break;
                } else {



Home | Main Index | Thread Index | Old Index