Date: Mon, 9 Nov 2020 13:54:29 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367523 - stable/12/usr.sbin/syslogd Message-ID: <202011091354.0A9DsTUW075216@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Mon Nov 9 13:54:29 2020 New Revision: 367523 URL: https://svnweb.freebsd.org/changeset/base/367523 Log: MFC r366576: syslogd: Avoid trimming host names in RFC 5424 mode PR: 250014 Modified: stable/12/usr.sbin/syslogd/syslogd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/12/usr.sbin/syslogd/syslogd.c Mon Nov 9 13:20:44 2020 (r367522) +++ stable/12/usr.sbin/syslogd/syslogd.c Mon Nov 9 13:54:29 2020 (r367523) @@ -2226,7 +2226,9 @@ cvthname(struct sockaddr *f) hl = strlen(hname); if (hl > 0 && hname[hl-1] == '.') hname[--hl] = '\0'; - trimdomain(hname, hl); + /* RFC 5424 prefers logging FQDNs. */ + if (RFC3164OutputFormat) + trimdomain(hname, hl); return (hname); } @@ -2853,7 +2855,9 @@ cfline(const char *line, const char *prog, const char hl = strlen(f->f_host); if (hl > 0 && f->f_host[hl-1] == '.') f->f_host[--hl] = '\0'; - trimdomain(f->f_host, hl); + /* RFC 5424 prefers logging FQDNs. */ + if (RFC3164OutputFormat) + trimdomain(f->f_host, hl); } /* save program name if any */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011091354.0A9DsTUW075216>