Fix journald audit logging with fields > N_IOVEC_AUDIT_FIELDS.
authorYmrDtnJu <YmrDtnJu@users.noreply.github.com>
Fri, 21 Jan 2022 17:21:27 +0000 (18:21 +0100)
committerLuca Boccassi <bluca@debian.org>
Mon, 14 Feb 2022 21:56:48 +0000 (21:56 +0000)
commit88c8a48dfdc8bba6266b527cad5f441226c71c98
tree6b8f8897a15b281a3f1bdde895886858ede3d8ad
parentef7ceef26adb714ef44b2fbc07a219c05a012b42
Fix journald audit logging with fields > N_IOVEC_AUDIT_FIELDS.

ELEMENTSOF(iovec) is not the correct value for the newly introduced parameter m
to function map_all_fields because it is the maximum number of elements in the
iovec array, including those reserved for N_IOVEC_META_FIELDS. The correct
value is the current number of already used elements in the array plus the
maximum number to use for fields decoded from the kernel audit message.

(cherry picked from commit df4ec48f45f518b6926e02ef4d77c8ed1a8b4e2c)
src/journal/journald-audit.c