systemd/0018-journal-explain-the-error-when-we-find-a-non-DATA-ob.patch
Michal Sekletar fb7efbf012 Assorted bugfixes and backports
Most notably revert of
743970d2ea

Resolves: #1170765,#1202598
2015-09-25 00:51:08 +02:00

32 lines
1.1 KiB
Diff

From e9fc552926b1c663653b81a7d09645e27f425db8 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Fri, 24 Jul 2015 02:02:07 +0200
Subject: [PATCH 18/47] journal: explain the error when we find a non-DATA
object that is compressed
Only objects of type DATA may be compressed, generate a message about
that, like we do for all other errros.
---
src/journal/journal-verify.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/journal/journal-verify.c b/src/journal/journal-verify.c
index 637162e..0a8f30c 100644
--- a/src/journal/journal-verify.c
+++ b/src/journal/journal-verify.c
@@ -123,8 +123,10 @@ static int journal_file_object_verify(JournalFile *f, uint64_t offset, Object *o
* other objects. */
if ((o->object.flags & OBJECT_COMPRESSED_XZ) &&
- o->object.type != OBJECT_DATA)
+ o->object.type != OBJECT_DATA) {
+ error(offset, "Found compressed object that isn't of type DATA, which is not allowed.");
return -EBADMSG;
+ }
switch (o->object.type) {
--
2.5.0