From e71d1f6c7839ac97ae2805269f2a65d273e357a9 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 20 Mar 2018 20:41:30 +0100 Subject: 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 --- src/journal/journal-verify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/journal/journal-verify.c b/src/journal/journal-verify.c index dc6b21b1e9..4d35168591 100644 --- a/src/journal/journal-verify.c +++ b/src/journal/journal-verify.c @@ -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; -- cgit v1.2.1