]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/journal/journald-stream.c
journald: only accept valid unit names for log streams
authorLennart Poettering <lennart@poettering.net>
Fri, 14 Jul 2017 17:03:32 +0000 (19:03 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 31 Jul 2017 16:20:28 +0000 (18:20 +0200)
commit7a1f1aaa789ae37b548bf55795e1733a21856c85
treecf7f9af5549e0b05f1b3f6b887bfb64e6e9cb906
parentec6fe7c86ab767e9fe6d9d5338e4716f9688f360
journald: only accept valid unit names for log streams

Let's be a bit stricter in what we end up logging: ignore invalid unit
name specifications. Let's validate all input!

As we ignore unit names passed in from unprivileged clients anyway the
effect of this additional check is minimal.

(Also, no need to initialize the identifier/unit_id fields of stream
objects to NULL if empty strings are passed, the default is NULL
anyway...)
src/journal/journald-stream.c