]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
syslogd: Increase message size limits
authorDmitry Wagin <dmitry.wagin@ya.ru>
Tue, 23 Mar 2021 16:15:28 +0000 (12:15 -0400)
committerMark Johnston <markj@FreeBSD.org>
Tue, 23 Mar 2021 16:49:58 +0000 (12:49 -0400)
commit2d82b47a5b4ef18550565dd55628d51f54d0af2e
treedb7ae3d6d8cb37666d18b62ad1b098dd64325806
parent9bd7345212203924046009e29ce3f1515556f989
syslogd: Increase message size limits

Add a -M option to control the maximum length of forwarded messages.
syslogd(8) used to truncate forwarded messages to 1024 bytes, but after
commit 1a874a126a54 ("Add RFC 5424 syslog message output to syslogd.")
applies a more conservative limit of 480 bytes for IPv4 per RFC 5426
section 3.2.  Restore the old default behaviour of truncating to 1024
bytes.  RFC 5424 specifies no upper limit on the length of forwarded
messages, while for RFC 3164 the limit is 1024 bytes.

Increase MAXLINE to 8192 bytes to correspond to commit 672ef817a192.

Replaced bootfile[] size for MAXPATHLEN used in getbootfile(3) as a
returned value. Using (MAXLINE+1) as a size for bootfile[] is excessive.

PR: 241937
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D27206
usr.sbin/syslogd/syslogd.8
usr.sbin/syslogd/syslogd.c