1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-29 21:47:05 +03:00

journal: don't insist that the journal file header's boot ID matches the last entry

We update the boot ID whenever the file is opened for writing (i.e. set
to ONLINE stat), even if we never write a single entry to it. Hence,
don't insist that the last entry's boot ID matches the file header.

As pointed out by Matthijs van Duin:

https://lists.freedesktop.org/archives/systemd-devel/2018-March/040499.html
This commit is contained in:
Lennart Poettering 2018-03-20 20:41:30 +01:00
parent ffe535e43e
commit e71d1f6c78

View File

@ -1245,7 +1245,7 @@ int journal_file_verify(
}
if (entry_monotonic_set &&
(!sd_id128_equal(entry_boot_id, f->header->boot_id) ||
(sd_id128_equal(entry_boot_id, f->header->boot_id) &&
entry_monotonic != le64toh(f->header->tail_entry_monotonic))) {
error(0, "Invalid tail monotonic timestamp");
r = -EBADMSG;