sd-journal: refuse entry objects with an empty boot ID
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 21 Sep 2023 20:08:12 +0000 (05:08 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 22 Sep 2023 06:05:53 +0000 (08:05 +0200)
commitc650d4cdef5c1b87237193995f08d7e2d1be0c44
tree16808b50584b74a11a338bcb4765c821108e49d3
parent1365355d14965e849d71b6b43536686aa04f9a60
sd-journal: refuse entry objects with an empty boot ID

Otherwise, e.g. sd_journal_get_monotonic_usec() return an empty boot ID
when called for such a broken entry object.

Such a broken object may be stored when the system was not cleanly shutdown.

Fixes #29167.
src/libsystemd/sd-journal/journal-file.c