Files
Kamino/changelogs/fragments/systemd-hardening-unit-lookup.yml
T
Dragonish 6c2d124b3f
Build / build (pull_request) Successful in 20s
Molecule / molecule (pull_request) Canceled after 0s
Lint / lint (pull_request) Canceled after 38s
fix(systemd_hardening): look up the listed units instead of listing every unit file
The role listed every service unit file to answer one question: is each
unit in its disable and mask lists installed? The listing keeps PID 1 busy
for as long as the host has unit files. Ask about the listed units only,
with one `systemctl show --property=LoadState`; a unit with no unit file
reports `not-found` and is skipped as before.

An instance name such as [email protected] is now matched when its template
exists. A template name such as [email protected] makes the lookup fail, where
the listing matched it.

Closes #283

Assisted-by: Claude Code
2026-11-22 19:41:23 +00:00

9 lines
514 B
YAML

---
bugfixes:
- >-
systemd_hardening - Look up the listed units with one ``systemctl show`` instead of listing every unit
file. The listing can keep PID 1 busy for seconds on a host with slow storage, and the cost grows with
the number of unit files. A unit is still skipped when it has no unit file. An instance name such as
``[email protected]`` is now matched when its template exists, and a template name such as
``[email protected]`` in the lists now makes the lookup fail instead of matching.