Commit Graph
1372 Commits
Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 7609c88df2 NEWS: typo 2026-09-23 21:55:37 +02:00
Luca Boccassi 726cc309b4 NEWS: open new changelog 2026-09-22 15:12:10 +02:00
Luca Boccassi b9979c1e1a NEWS: finalize 2026-09-22 15:12:10 +02:00
Luca Boccassi 2972f1f047 NEWS: update contributors list 2026-09-22 15:12:10 +02:00
Zbigniew Jędrzejewski-Szmek 541b1335f5 Rename KExecsCount to KExecCount 2026-09-22 14:38:02 +02:00
Zbigniew Jędrzejewski-Szmek 63a7cf844d NEWS: some tweaks before release
Introspection is implemented for everything that has a command-line
parser, not only for select binaries.

Standarize on "rate-limit" as the spelling in docs.

Various other smaller tweaks and clarifications.
2026-09-22 12:47:54 +02:00
Luca Boccassi 5d414df040 NEWS: drop truncated sentence 2026-09-21 11:17:45 +02:00
Yu Watanabe 24de80f596 docs: fix typos and grammar in NEWS, README and TODO 2026-09-17 11:49:45 +09:00
Luca Boccassi 745b63fbb0 NEWS: finalize time and place 2026-09-15 12:25:09 +01:00
Luca Boccassi 0bf0584123 NEWS: update contributors list 2026-09-15 12:25:09 +01:00
Lennart Poettering f0baee29b3 sysupdate: change "appstream" json prop back to "appStream"
Similar as the previous commit: the field was renamed by accident, and
we should revert to the old name to not break compat needlessly, and
because the old name actually made sense, given the underlying .transfer
file knob is AppStream=
2026-09-14 15:15:58 +02:00
Lennart Poettering f05a0cef9f sysupdate: rename isEnabled to enabled
The "isEnabled" name was changed from "enabled" post v261 by accident
(because a6f7ded859 replaced json
formatting via table formatter to a native json generator which was
introduced for varlink, which changed the names). THis was later made
official in #43603, but it should rather have changed things back to the
original name, in particular as the underling .feature file field
actually is called "Enabled=" and not "IsEnabled=".

We really should take care to generate the same names for Varlink JSON
data as for the data returned by the systemd-sysupdate cli.
a6f7ded859 ensured that, so that's great.
But at the same time I think the varlink names should be adjusted to the
old names, since varlink support for this was just added in this cycle.

Given that v262 is not tagged yet, let's now revert to the old name.
2026-09-14 14:33:33 +02:00
Cathal Mullan 1f66b52452 nspawn: align config PrivateUsersOwnership default with CLI
The `systemd-nspawn` manpage says:

    The `--private-users-ownership=auto` option is implied if
    `--private-users=pick` is used.

This is true for the CLI, but not when set in a `.nspawn` file.
Assuming these defaults should be the same across both.

This default was also not updated when `managed` was added by #35685.

As a result, this is a change in behavior for users who didn't set an
explicit `PrivateUsersOwnership=` value in their `.nspawn` file.
2026-09-14 08:10:27 +01:00
Zbigniew Jędrzejewski-Szmek 71024c2c43 NEWS: fix typo and reword description of tags
"arbitrary strings" is not very meaningful or even true.
2026-09-09 10:46:10 +02:00
Lennart Poettering d7c3467fd9 NEWS: fix field name 2026-09-09 17:24:09 +09:00
Luca Boccassi baf4eae065 NEWS: finalize date 2026-09-08 20:47:54 +01:00
Luca Boccassi 406ef29870 NEWS: update contributors 2026-09-08 20:47:54 +01:00
dongshengyuan a6f7ded859 updatectl: fix feature JSON parsing
The feature JSON payload switched to `id`, `isEnabled`, and `appstream`,
and made `documentation` an array of URLs.
`updatectl` still parsed legacy table-derived names and a single URL.
This broke feature JSON parsing and made output inconsistent.
Features without documentation could also cause a null dereference.

Align `updatectl` with the current schema and preserve all
documentation URLs across sysupdate, D-Bus, and Varlink payloads.
Propagate condition evaluation errors through `condition_test_list()`
and `feature_is_suggested()`, with consistent JSON error handling and
tests.
The `suggested` field is now optional and always a boolean when
present; it is omitted rather than set to an error string when
SuggestOn*= conditions cannot be evaluated.
Add `suggested` metadata and document the field transition.

Follow-up for 3e34ccf6df.
Follow-up for 75a247d4de.
Follow-up for 40e727c93b.

Fixes #43603
2026-09-08 16:05:36 +02:00
Michael Vogt 1162e03e5d NEWS: move "systemd-sysext status --json=" change to right place
Originally https://github.com/systemd/systemd/pull/43595 was
targeted for v263 and the NEWS entry was for v263 too.

However it got merged now for v262 (for the right reasons) so
this commit updates the NEWS file.
2026-09-08 15:23:01 +09:00
Zbigniew Jędrzejewski-Szmek 9c665ee7aa units: allow disabling systemd-coredumpd.service
The new unit is nice, but it might not be appropriate in all scenarios. It
requires a new kernel, which might be known to not be available, and also
changes sysctl kernel.core_pattern at runtime, which might not be desired.
Replace static enablement by a normal [Install] section and add the unit
to presets to enable it by default.

The awkward instructions in the man page are simplified and adjusted.
2026-09-08 14:31:45 +09:00
Michael Vogt 7efa326b7a sysext: use [] in json mode when giving the extension status
The json mode was returning the string `none` when unmerged and
an array for merged extensions. Return an empty array instead.

Instead of branching on the output format, always add an empty strv
for an unmerged hierarchy: the table code renders an empty strv as
the ersatz string ("-") in text mode and as an empty array in json
mode. This also changes the human-readable output from "none" to "-".

It also updated the TEST-50-DISSECT.sysext.sh test. Technically
this is a compatbility break but its also arguably a bugfix.
2026-09-07 18:29:25 +02:00
Yu Watanabe 2560925dd8 NEWS: fix typo 2026-09-07 20:43:18 +09:00
Lennart Poettering 92c9f787a7 NEWS: various updates 2026-09-03 17:45:02 +02:00
Yu Watanabe 736cb91535 resolved: actually unregister DNS-SD services when the D-Bus client vanishes (#43578)
Since the D-Bus DNS-SD API was introduced in c3036641f0ed (v236),
`RegisterService()` has created an `sd_bus_track` object to destroy the
registered service when the registering client disconnects from the bus.
However, the track object is a `_cleanup_(sd_bus_track_unrefp)` local in
`bus_method_register_service()` that is never stored anywhere, so it is
destroyed again as soon as the method handler returns. The vanish
handler (`dnssd_registered_service_on_bus_track()`) has thus been dead
code for the past ~8 years.

The observable effect: services registered via D-Bus silently persist
after the client disconnects — unowned, advertised until resolved exits,
and impossible to re-register since the identifier stays taken
(`DNSSD_SERVICE_EXISTS`). At the same time, the registration doesn't
survive a resolved restart, so the current behavior is neither reliably
ephemeral nor reliably persistent. Noticed while reviewing a project
that (unknowingly relying on this bug) registers a service with a
one-shot `gdbus call` and expects it to persist.

This PR:
1. splits the goodbye/zone-removal logic out of
`bus_dnssd_method_unregister()` into a helper — the vanish path needs
the full teardown, not just `dnssd_registered_service_free()`, which
would leave the service's RRs published in the per-link mDNS zones;
2. stores the track object in `DnssdRegisteredService`, making client
tracking work as originally intended;
3. documents the lifetime semantics in `org.freedesktop.resolve1(5)`
(matching the equivalent Avahi D-Bus API, whose entry groups are
likewise bound to the client connection) and points to `*.dnssd` files
for registrations independent of a client's lifetime;
4. adds a TEST-75 case covering the connection-bound lifetime.

Note this is a behavioral change for fire-and-forget clients (one-shot
`busctl`/`gdbus` invocations). Arguably those were never working
reliably (registrations silently vanished on any resolved restart, and
stale entries blocked re-registration), but if this is deemed too risky,
the alternative would be to drop the dead tracking code and codify the
persist-until-exit behavior instead — I'd argue tracking as originally
intended is the better contract.

Verification: code compiles; the new integration test is included.
2026-09-03 06:14:31 +09:00
Stefan Agner 11e4e35f4c resolved: actually unregister DNS-SD services when the bus client vanishes
Since the D-Bus DNS-SD API was introduced in c3036641f0 ("resolved:
implement D-Bus API for DNS-SD", v236), RegisterService() has set up an
sd_bus_track object so that a registered service is destroyed when the
client that registered it disconnects from the bus — there's even a
handler logging "Client of active request vanished, destroying DNS-SD
service."

However, the track object was never stored anywhere: it is declared as
a _cleanup_(sd_bus_track_unrefp) local in bus_method_register_service()
and hence destroyed again when the method handler returns, taking the
tracking down with it. The vanish handler was thus dead code, and
services registered via D-Bus silently persisted after their client
disconnected — unowned, impossible to re-register (the identifier
stays taken, failing with DNSSD_SERVICE_EXISTS), and advertised until
systemd-resolved itself exited.

Store the track object in DnssdRegisteredService, pinning it for the
lifetime of the service, so that client tracking works as originally
intended. Route the vanish path through the full unregistration logic
(goodbye packets + removal from the per-link mDNS zones), since freeing
the service alone would leave its RRs published in the zones.

Note for fire-and-forget clients (e.g. one-shot busctl/gdbus calls):
these were never reliable — the registration silently vanished on any
resolved restart — and now behave as documented for the corresponding
Avahi API as well: the bus connection must be kept open for as long as
the service is to remain registered. Document that in the man page and
NEWS, and point to *.dnssd files for registrations independent of a
client's lifetime.
2026-09-02 10:40:34 +02:00
Luca Boccassi 9be66f9759 NEWS: finalize time and place 2026-09-01 11:42:23 +02:00
Luca Boccassi a25729eeda NEWS: list contributors 2026-09-01 11:42:23 +02:00
Luca Boccassi 72f3a4a73c NEWS: update up to 9064524e44 2026-09-01 11:42:23 +02:00
Luca Boccassi 2de150d7b7 Add experimental manpage marker, use it for sd-sysupdate and move it back to libexecdir (#43533) 2026-08-27 10:46:01 +01:00
Luca Boccassi 104ce53916 NEWS: note that sysupdate is experimental again 2026-08-26 19:51:31 +01:00
Yu Watanabe 6fe09adf81 network: several follow-ups for proxy neighbor setting (#43408)
Follow-ups for 08bebda611.
2026-08-27 00:09:59 +09:00
zouge666 eb020fc492 import: merge default OpenPGP keyrings
When an administrator installed a custom keyring under /etc,
signature verification selected it instead of the vendor keyring
under /usr. That could make vendor-signed system updates stop
verifying after adding local keys.

Collect all readable default keyrings, including the current and
legacy /etc paths, and pass temporary copies to GnuPG with
separate --keyring options. Keep SYSTEMD_OPENPGP_KEYRING as an
explicit override, add regression coverage for keyring
coexistence, override behavior, and current-path signing, and
silence the expected shellcheck false positive in the test
cleanup helper.

Closes: #40702
2026-08-26 11:35:55 +01:00
Jörg Behrmann 7824cc524d NEWS: IEC prefixes are binary 2026-08-26 10:56:12 +02:00
Jörg Behrmann e88adcdd2b NEWS: mark --introspect-cli as experimental 2026-08-26 10:51:53 +02:00
Luca Boccassi 1aec3dfbef NEWS: update up to b6c432be08 2026-08-25 19:27:50 +01:00
Zbigniew Jędrzejewski-Szmek b6c432be08 meson: drop deprecated options (#43410)
The meson option -Dlibiptc= was deprecated in v259. Other options were
deprecated in v260.
2026-08-25 18:33:55 +02:00
Aleksa Sarai 44cc69769d hostnamed: expose parsed TAGS in Describe
The DBus API already exposes the parsed machine-tags list via the Tags
property but varlink clients needed to parse the raw TAGS= line from
MachineInformationData (which also required implementing tag name
validation if the tags would later be used with SetTags, to avoid
spurious errors).

So, provide the same information that DBus gets (a list of pre-parsed
tags with bad tags gracefully removed) as a new MachineTags field
returned by Describe -- this does mean that the DBus API now exposes the
same data in two ways but making Describe() consistent is more important
and mirrors the OperatingSystem* class of properties.
2026-08-23 14:10:22 +01:00
Yu Watanabe 671ebb287e meson: drop deprecated options
The meson option -Dlibiptc= was deprecated in v259.
Other options were deprecated in v260.
2026-08-18 02:10:53 +09:00
Yu Watanabe ab269ec8b2 doc: mention ProxyNeighbor= in man and NEWS 2026-08-17 17:19:09 +09:00
dongshengyuan 253b34d8ac resolvconf: reject malformed stdin without changing link state
The resolvconf compatibility parser ignored errors from
nameserver, domain, and search lines. If one of those lines was
malformed, resolvectl could still send the partially parsed
configuration to resolved and overwrite the previous link state.

Reproducer:

  IF=enp1s0
  TMP="$(mktemp -d)"

  ln -s "$(command -v resolvectl)" "$TMP/resolvconf"

  sudo resolvectl dns "$IF" 1.1.1.1
  sudo resolvectl domain "$IF" keep.example
  resolvectl domain "$IF"

  printf 'nameserver 1.1.1.1\nsearch "unterminated\n' |
    sudo "$TMP/resolvconf" -a "$IF" || true

  resolvectl domain "$IF"

Before:

  The malformed search line was ignored and the previous domain
  was cleared:

    Link 2 (enp1s0): keep.example
    Link 2 (enp1s0):

After:

  The malformed input fails before updating resolved, so
  keep.example remains configured.

Follow-up for: 097f130731
2026-08-13 17:40:50 +08:00
Christian Brauner 24bbacbe7a man: document union filesystem resolution for RestrictFileSystemAccess=
Replace the paragraph that claims overlayfs is always blocked. Mention
that only the file data is checked, keep the btrfs note and mention the
new behavior in NEWS.

Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
2026-08-10 16:09:06 +02:00
Yu Watanabe f8f2860750 core/service: Prevent accidental service termination during reload (#39692)
We currently blindly send the configured reload signal (e.g. SIGHUP or
SIGUSR1) to the main service PID for Type=notify-reload units, even if
the service hasn't installed a userspace handler. This can lead to
invoking unintended default behavior (typically process termination) in
daemons which later deprecate and remove their reload handler.

This is a real problem we have seen in production on multiple occasions.
In one particularly egregious instance, a production distributed storage
service had a large percentage of its nodes all terminate at once when
sent a reload signal. In this case a signal handler had been removed,
but another place still sending the signal was missed.

To mitigate this, introduce two new checks for Type=notify-reload
services:

1. On READY=1: When the service first sends READY=1 during initial
startup, we check for the handler. If it's missing, the service startup
is failed with SERVICE_FAILURE_PROTOCOL. This enforces the contract that
services *must* install their handler before signalling readiness.

2. On reload: Immediately before sending the reload signal, we check
again. If the handler is now missing, we log a warning but still send
the signal. This preserves the requested operator action while making
the missing handler visible.

The startup check catches definite static misconfiguration before the
service is accepted as ready. The reload check is advisory because the
service has already started successfully, but warns if its handler later
disappears. Together these provide a best-effort safety net while
preserving the agreed reload semantics.
2026-08-07 01:23:03 +09:00
Chris Down d361e5ba34 core/service: Prevent accidental service termination during reload
We currently blindly send the configured reload signal (e.g. SIGHUP or
SIGUSR1) to the main service PID for Type=notify-reload units, even if
the service hasn't installed a userspace handler. This can lead to
invoking unintended default behavior (typically process termination) in
daemons which later deprecate and remove their reload handler.

This is a real problem we have seen in production on multiple occasions.
In one particularly egregious instance, a production distributed storage
service had a large percentage of its nodes all terminate at once when
sent a reload signal. In this case a signal handler had been removed, but
another place still sending the signal was missed.

To mitigate this, introduce signal handler validation for
Type=notify-reload services. We check both SigCgt (traditional handlers
via sigaction) and SigBlk (blocked signals for signalfd) to detect valid
handler configurations:

1. On first READY=1: When the service first sends READY=1 during initial
   startup, we check for the handler. If it's missing, the service
   startup is aborted with Result=protocol.

2. On reload: Immediately before sending the reload signal, we check
   again. If the handler is missing, we log a warning but still send
   the signal.

The rationale is that a missing handler at first startup represents a
definite misconfiguration that should be caught early. A missing handler
at reload time is warned about, but we defer to the operator's judgement
since the service already started successfully.

These checks are a best-effort, pragmatic safety net. They are naturally
racy, but in practice they prevent the common class of bugs from static
misconfiguration or software updates.
2026-08-04 16:51:37 -07:00
Paul Meyer 156fb14b6a report: replace boolean --sign with signing modes
Turn --sign=BOOL into --sign=no|best-effort|require-one|require-all,
making the multi-signer aggregation policy explicit: best-effort never
fails on signing, require-one requires at least one signature, and
require-all requires every signer to succeed (an empty reply, i.e. a
signer opting out, counts as failure). Signed reports are always emitted
as a JSON-SEQ stream. The mode is also exposed as an input to the
io.systemd.Report.GenerateSigned Varlink method.

Signed-off-by: Paul Meyer <katexochen0@gmail.com>
2026-08-02 15:13:35 +09:00
Yu Watanabe d2685c303b tmpfiles: reject extra argument fields and make 'r'/'R' support age field (#43195)
This updates systemd-tmpfiles in two small areas:

- Reject non-empty argument fields for tmpfiles.d line types that do not
consume the argument field, instead of warning and silently ignoring
them.
- Let `r` and `R` tmpfiles.d entries honor the `Age` field when
`systemd-tmpfiles --clean` is used. The existing `--remove` behavior
remains unconditional.

The completed TODO entries are removed, and NEWS/man page documentation
is updated for the visible behavior changes.
2026-08-01 01:34:08 +09:00
dongshengyuan 249421e75e tmpfiles: honor age for r/R cleanup
Let r and R lines participate in --clean when they specify an age. The
target itself is removed only after its selected file or directory
timestamps have aged enough; --remove remains unconditional.

Follow-up for: beca6b6e6b
2026-07-30 13:45:52 +08:00
dongshengyuan e347f63b0f tmpfiles: reject unused argument fields
Line types which do not use the argument field used to warn and ignore
a non-empty field. Treat that as invalid configuration instead, so typos
are not silently accepted.

Follow-up for: 614cc34f3a
2026-07-29 15:29:54 +08:00
Paul Meyer 57f8a85a21 cryptsetup: measure volume key and keyslot via the pcrextend Varlink service (#43109)
Motivated by
https://github.com/systemd/systemd/pull/43041#discussion_r3595022610.

Switch systemd-cryptsetup's volume-key and keyslot measurements from
driving the TPM directly (tpm2-util) to the io.systemd.PCRExtend Varlink
service, aligning it with how the verity and imds measurements already
work.

Some notes on decisions taken:
- The volume key is sent over the wire. systemd-pcrextend will do the
hmac. The socket is root only. Otherwise we would need to do bank
negotiation via varlink and pollute the interface with it.
- `tpm2-measure-bank=` deprecated/dropped. Same reason as above.
- `tpm2-device=` now only affects unlocking. The device for measurements
is selected by pcrextend.
- Measuring requires the presence of `systemd-pcrextend.socket` in the
initrd, should be already given as systemd-veritysetup relies on it,
too.
- Logs are done on the pcrextend side.
2026-07-29 07:21:08 +02:00
dongshengyuan f5ffb38606 tools: add -n shortcut for --dry-run
Accept -n as a short option for --dry-run in bootctl,
systemd-oomd, systemd-sysusers, and systemd-tmpfiles.

For systemd-repart, make -n equivalent to --dry-run=yes,
while keeping --dry-run=BOOL available.

Follow-up for: 2479f0bb09
2026-07-29 03:47:58 +09:00
Paul Meyer 1bdf2db6f7 cryptsetup: measure via the pcrextend varlink service
Measure the volume key and unlock keyslot through io.systemd.PCRExtend
instead of driving the TPM directly via tpm2-util, matching how the
verity and imds measurements already work.

Bank selection and the TPM context now live entirely in
systemd-pcrextend. As a result the tpm2-measure-bank= crypttab option
can no longer be honored per volume and is now a deprecated no-op.

Signed-off-by: Paul Meyer <katexochen0@gmail.com>
2026-07-28 14:59:02 +02:00