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 */ _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"