1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-13 17:18:18 +03:00

journal: warn when we fail to append a tag to a journal

We shouldn't silently fail when appending the tag to a journal file
since FSS protection will simply be disabled in this case.
This commit is contained in:
Franck Bui 2016-09-23 12:12:13 +02:00
parent a4d373452d
commit 43cd879483

View File

@ -333,8 +333,13 @@ JournalFile* journal_file_close(JournalFile *f) {
#ifdef HAVE_GCRYPT
/* Write the final tag */
if (f->seal && f->writable)
journal_file_append_tag(f);
if (f->seal && f->writable) {
int r;
r = journal_file_append_tag(f);
if (r < 0)
log_error_errno(r, "Failed to append tag when closing journal: %m");
}
#endif
if (f->post_change_timer) {