HomeFreeBSD

Fix saving STRUCTURED-DATA in RFC 5424 log format

Description

Fix saving STRUCTURED-DATA in RFC 5424 log format

When saving log files in RFC 5424 format presence of STRUCTURED-DATA
in message caused line to not appear in log file at all, because
a variable forgotten to initialize. This could be tested by (slightly
modified) example from RFC:

echo '<165>1 2003-10-11T22:14:15.003Z mymachine.example.com su 12345 ID47 [exampleSDID@32473 iut="3" eventSource="Application" eventID="1011"][id@2 test="tast"] BOM"su root" failed for lonvick on /dev/pts/8" ' | nc -w1 -Uu /var/run/log

While here, update stale information in comment to logmsg() that RFC 5424
log format was not supported.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/717

Details

Provenance
Vadim Goncharov <vadimnuclight@gmail.com>Authored on Jul 7 2023, 5:15 AM
impCommitted on Jul 7 2023, 5:15 AM
Parents
rG761ab48d6af8: kbdcontrol: Remove compat code for 4.x -> 5.x transition
Branches
Unknown
Tags
Unknown

Event Timeline