diff options
author | Franck Bui <fbui@suse.com> | 2016-09-23 12:12:13 +0200 |
---|---|---|
committer | Franck Bui <fbui@suse.com> | 2016-09-23 14:59:00 +0200 |
commit | 43cd8794839548a6f332875e8bee8bed2652bf2c (patch) | |
tree | e8da3d41893bd7116df1756ab60880c84c5d52cd | |
parent | a4d373452dc71d8a4e03608e7b64de0923042df8 (diff) |
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.
-rw-r--r-- | src/journal/journal-file.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 7504326bff..f6f58a1ae3 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) { |