summaryrefslogtreecommitdiff
path: root/src/journal/journal-file.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-08-18 00:38:57 +0200
committerLennart Poettering <lennart@poettering.net>2012-08-18 00:38:57 +0200
commitc586dbf110abdbf0317bdd0f0a5900d709194409 (patch)
tree4f3d28392f34e9a76e259eb7cc96d5561204ddca /src/journal/journal-file.c
parentdb11ac1ab56bc13514a029e7d126c5efe2c68bc2 (diff)
journal: fix verification without key
Diffstat (limited to 'src/journal/journal-file.c')
-rw-r--r--src/journal/journal-file.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 3cf28a7f3c..e04ffd0452 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -65,7 +65,7 @@ void journal_file_close(JournalFile *f) {
assert(f);
/* Write the final tag */
- if (f->seal)
+ if (f->seal && f->writable)
journal_file_append_tag(f);
/* Sync everything to disk, before we mark the file offline */
@@ -252,7 +252,9 @@ static int journal_file_verify_header(JournalFile *f) {
}
f->compress = !!(le32toh(f->header->incompatible_flags) & HEADER_INCOMPATIBLE_COMPRESSED);
- f->seal = !!(le32toh(f->header->compatible_flags) & HEADER_COMPATIBLE_SEALED);
+
+ if (f->writable)
+ f->seal = !!(le32toh(f->header->compatible_flags) & HEADER_COMPATIBLE_SEALED);
return 0;
}