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