nix: add assertions to make sure dbus can provide pidfd#8
Merged
LordGrimmauld merged 1 commit intoLordGrimmauld:mainfrom Jan 31, 2026
Merged
nix: add assertions to make sure dbus can provide pidfd#8LordGrimmauld merged 1 commit intoLordGrimmauld:mainfrom
LordGrimmauld merged 1 commit intoLordGrimmauld:mainfrom
Conversation
LordGrimmauld
requested changes
Jan 31, 2026
Owner
LordGrimmauld
left a comment
There was a problem hiding this comment.
I see no issue with the warnings, and this is a good change. Noisy assertions are better than silent fails. But i don't think we should set broker dbus here.
Tested by @zimward just now, broker vs classic does indeed make all the difference here. Good find!
Sorry for taking a while to get around to this properly, and thank you for the PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a safety check for the security.polkit.persistentAuthentication option to ensure it actually functions as intended. Currently, this feature can silently fail if the underlying D-Bus implementation is too old to provide the necessary process metadata.
Systemd uses the system-bus-name subject type when communicating with Polkit (systemd/systemd). To verify this subject, Polkit retrieve information about the process via D-Bus (polkit-org/polkit). If the D-Bus implementation is too old to provide
pidfdin this process, Polkit will explicitly disables authentication persistence to mitigate PID reuse attacks (polkit-org/polkit).This matters because
dbus-daemonis still the default implementation in NixOS and it has been stuck on 1.14.10 for a long time (NixOS/nixpkgs#386170).