journal: refuse opening journal files from the future for writing
authorLennart Poettering <lennart@poettering.net>
Wed, 12 Oct 2016 16:53:35 +0000 (18:53 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 12 Oct 2016 18:25:20 +0000 (20:25 +0200)
commitae739cc1edc7cfa9d1afb4b7087c434aadf61a7a
tree4e53d44cd011ec0fea29b1c4e35de15f4ef48b36
parent7c07001711ee1f0aa7a3db7b63b354a4800cadcc
journal: refuse opening journal files from the future for writing

Never permit that we write to journal files that have newer timestamps than our
local wallclock has. If we'd accept that, then the entries in the file might
end up not being ordered strictly.

Let's refuse this with ETXTBSY, and then immediately rotate to use a new file,
so that each file remains strictly ordered also be wallclock internally.
src/journal/journal-file.c
src/journal/journald-server.c