diff options
| author | tzyt <zyt2006613@outlook.com> | 2026-03-22 08:40:57 +0000 |
|---|---|---|
| committer | Enji Cooper <ngie@FreeBSD.org> | 2026-03-29 03:43:42 +0000 |
| commit | 69042706604752f42072f422671a72c49343ac45 (patch) | |
| tree | 06da6f9f3e66af22846ee7bc64f10f0ac4bb87ae /tools/test/stress2/misc/elf.sh | |
| parent | e7de7feb74262bfdb04d285846bac2fc6229f734 (diff) | |
This change fixes Bug 293879, where ereregex filters in syslogd
did not handle alternation correctly.
The issue appears to come from mixing up two different kinds of
flags: syslogd's internal serialized filter flags in
usr.sbin/syslogd/syslogd.h, and the regex compilation flags from
include/regex.h. ereregex was storing REG_EXTENDED in cmp_flags,
even though cmp_flags is meant to carry syslogd's own FILT_FLAG_*
values for configuration serialization and reconstruction.
REG_EXTENDED has the same bit value as FILT_FLAG_EXCLUDE, so the
filter could be reconstructed with the wrong semantics.
The fix stores FILT_FLAG_EXTENDED instead, allowing syslogd to
correctly REG_EXTENDED when compiling the regex.
A test was also added for both ereregex and !ereregex filters.
PR: 293879
Signed-off-by: tzyt <zyt2006613@outlook.com>
Fixes: 2567168dc4986
MFC after: 1 week
Reviewed-by: markj, ngie
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2088
Diffstat (limited to 'tools/test/stress2/misc/elf.sh')
0 files changed, 0 insertions, 0 deletions
