Commit Graph

4 Commits

Author SHA1 Message Date
Mike Yuan
d8302c2fd9 journalctl-vl-server: allow querying units for specific uid in system scope
This also moves journal_add_unit_matches() back to
journalctl-filter.[ch], as I see more appropriate.
2026-02-23 10:43:00 +01:00
Mike Yuan
2afe8e28f8 units/systemd-journalctl@.service: run with DynamicUser=yes
Follow-up for a109189fab

This follows the existing practice for
systemd-journal-{upload,gatewayd}.service,
as I think allocating a full-blown user
specifically for this purpose is an overkill.
And with DynamicUser=yes we can also take
advantage of implied sandboxing.
2026-02-23 10:21:56 +01:00
Mike Yuan
2619656950 units/systemd-journalctl@.service: require mount for /var/log/journal/ 2026-02-23 10:21:56 +01:00
Michael Vogt
a109189fab journalctl: add new varlink read service to get entries
We already have some varlink support for the journal to perform
some actions like `Rotate`. It would be nice to be able to query
the journal via varlink too so this commit adds a new varlinkctl
based journal service that exposes a single GetEntries() call
to retrieve journal entries. Basic filtering is supported and
we can expand the API as needed.

This is a separate `io.systemd.JournalControl` [1] service from the
existing `io.systemd.Journald` to decouple read and write (thanks
to Lennart for suggesting this).

This also extracts some shared helper so that we do not duplicate
code when generating the json or when adding the filters.

[1] The name mirrors the bootctl->io.systemd.BootControl naming.
2026-02-21 13:02:38 +01:00