[backport 2.3] Separate auth and logic for the daemon#5640
[backport 2.3] Separate auth and logic for the daemon#5640Ericson2314 merged 1 commit intoNixOS:2.3-maintenancefrom
Conversation
|
Care to explain why this needs to be backported? The new test makes me believe that it’s just for the |
|
@regnat heh a few things:
|
|
I marked this as stale due to inactivity. → More info |
8c252a4 to
e0319ca
Compare
e0319ca to
88e13cf
Compare
|
draft until it is needed. |
|
🎉 All dependencies have been resolved ! |
Before, processConnection wanted to know a user name and user id, and `nix-daemon --stdio`, when it isn't proxying to an underlying daemon, would just assume "root" and 0. But `nix-daemon --stdio` (no proxying) shouldn't make guesses about who holds the other end of its standard streams. Now processConnection takes an "auth hook", so `nix-daemon` can provide the appropriate policy and daemon.cc doesn't need to know or care what it is. (cherry picked from commit 8d4162f)
88e13cf to
9132d5b
Compare
|
My comments from 4 years ago were not that clear :). The reasons to backport this are:
|
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2025-02-17-meeting-minutes-213-214/60813/1 |
Before,
processConnectionwanted to know a user name and user id, andnix-daemon --stdio, when it isn't proxying to an underlying daemon, would just assume "root" and 0. Butnix-daemon --stdio(no proxying) shouldn't make guesses about who holds the other end of its standard streams.Now
processConnectiontakes an "auth hook", sonix-daemoncan provide the appropriate policy and daemon.cc doesn't need to know or care what it is.(cherry picked from commit 8d4162f)
Depends on #5650
(not actually, but yes in terms of it wouldn't be useful until then.)