When a streaming method's callback returns 0 with no replies enqueued and sd_varlink_set_sentinel() was passed NULL (POINTER_MAX), the framework emits an empty parameters reply via sd_varlink_reply(v, NULL) as a clean stream terminator. That call validated the empty parameters against the method's output IDL — which always failed when the IDL declared any mandatory output field, generating a spurious 'didn't pass validation' warning even though the empty terminator is correct by construction. Move the body of sd_varlink_reply() into a static varlink_reply_internal() that takes a skip_validation flag. The public sd_varlink_reply() keeps its existing behavior (validation enabled). Add a static varlink_reply_terminator() helper that wraps varlink_reply_internal(v, NULL, /* skip_validation= */ true), and route varlink_dispatch_sentinel() through it for the synthetic empty terminator, so both the synchronous dispatch path (varlink_dispatch_method()) and the fiber path (varlink_fiber_entry()) skip validation in one place. Without this, callers who want 'streaming method, possibly empty result' semantics had to either fire a logically wrong 'NotFound'-style error sentinel on empty (sysext.List, BootControl.ListBootEntries pattern) or mark every output field NULLABLE just to placate the validator (the io.systemd.Manager.EnqueueMarkedJobs approach), misrepresenting the contract — exactly the tradeoff the FIXME in pcrlock.c flagged. With this change, the empty terminator is invisible to the IDL validator and the FIXME is no longer needed. Co-developed-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
System and Service Manager
Details
Most documentation is available on systemd's web site.
Assorted, older, general information about systemd can be found in the systemd Wiki.
Information about build requirements is provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the Code Map for information about this repository's layout and content.
Please see the Hacking guide for information on how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list, join our IRC channel #systemd on libera.chat or Matrix channel
Stable branches with backported patches are available in the stable repo.
We have a security bug bounty program sponsored by the Sovereign Tech Fund hosted on YesWeHack
Repositories with distribution packages built from git main are available on OBS, and also repositories with packages built from the latest stable release
