From: Lennart Poettering Date: Fri, 17 Aug 2012 20:10:36 +0000 (+0200) Subject: journal: be fine with opening rotated/corrupted journal files X-Git-Tag: v189~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a0108012974558c5a7dcf8c76456be6a07b0e95d;p=thirdparty%2Fsystemd.git journal: be fine with opening rotated/corrupted journal files --- diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 4d7a6ff17d4..08d4285d0e6 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -1957,7 +1957,8 @@ int journal_file_open( (flags & O_ACCMODE) != O_RDWR) return -EINVAL; - if (!endswith(fname, ".journal")) + if (!endswith(fname, ".journal") && + !endswith(fname, ".journal~")) return -EINVAL; f = new0(JournalFile, 1);