]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/journal/journal-file.c
journal-remote: use source's boot-id
authorChris Morin <cmtm@google.com>
Thu, 14 Mar 2019 18:24:52 +0000 (11:24 -0700)
committerLennart Poettering <lennart@poettering.net>
Tue, 2 Apr 2019 08:32:21 +0000 (10:32 +0200)
commit924426a703a6923eedd63d23e6656655805598aa
tree72e4095e21e1bfbb6c3dc2e160e19afe86552495
parent52cf2b13a091c759ed3d2bcab90e1b054c710704
journal-remote: use source's boot-id

systemd-journal-remote always wrote the boot-id of the device it was running on
to the header of its journal files. When the source had a different boot-id
(because it was generated on a different boot, or a different device), the
boot-ids in the file were inconsistent. The _BOOT_ID field was that of the
source, but the journal file header and each entry object header were that of
the device systemd-journal-remote ran on. This breaks journalctl --list-boots
on any of these files.

Set the boot-id in the header to be that of the source. This also fixes the
entry object headers.
src/journal-remote/journal-remote-parse.c
src/journal-remote/journal-remote-write.c
src/journal-remote/journal-remote-write.h
src/journal/journal-file.c