summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-03-20 20:41:30 +0100
committerLennart Poettering <lennart@poettering.net>2018-03-20 23:31:11 +0100
commite71d1f6c7839ac97ae2805269f2a65d273e357a9 (patch)
tree725f6508b2f1bdb1dd6ccdf1a2b9bf8a5ff901cd
parentffe535e43e81876d0520c37660df8015ff5a02bf (diff)
downloadsystemd-e71d1f6c7839ac97ae2805269f2a65d273e357a9.tar.gz
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
-rw-r--r--src/journal/journal-verify.c2
1 files changed, 1 insertions, 1 deletions
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;