From: Franck Bui Date: Fri, 23 Sep 2016 10:12:13 +0000 (+0200) Subject: journal: warn when we fail to append a tag to a journal X-Git-Tag: v232~194^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=43cd8794839548a6f332875e8bee8bed2652bf2c;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 7504326bff2..f6f58a1ae32 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -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) {