journal: allow writing journal files even if machine-id is missing
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 16 May 2018 12:02:24 +0000 (14:02 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 31 May 2018 11:04:18 +0000 (13:04 +0200)
commitfd4885df947a23b8f40c08f08ac7f7d13a8abdf4
tree09dfac1c5f9091e598e3250ada951fd07a531686
parentea03f6ba0d66374594d716fc0e84e4d65906d2c3
journal: allow writing journal files even if machine-id is missing

The code to open journal files seems like the wrong place to enforce this. We
already check during boot and refuse to boot if machine-id is missing, no need
to enforce this here. In particular, it seems better to write logs from
journald even if they are not completely functional rather than refuse to
operate at all, and systemd-journal-remote also writes journal files and may
even be run on a system without systemd at all.

The docker image that oss-fuzz uses has an empty /etc/machine-id. Obviously
this is an error in the docker, but docker is fact of life, and it seems better
for systemd-journal-remote to work in such an incomplete environment.
src/journal/journal-file.c