chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
journal: be fine with opening rotated/corrupted journal files
[elogind.git]
/
src
/
journal
/
journal-file.c
diff --git
a/src/journal/journal-file.c
b/src/journal/journal-file.c
index 4d7a6ff17d4b1ab6ec8ac018985eb314b48507bd..08d4285d0e6dbd5391448f50d6e44aed3fc92c2a 100644
(file)
--- 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);