mirror of
https://github.com/NixOS/nix.git
synced 2025-11-29 05:31:00 +01:00
Separate auth and logic for the daemon
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 8d4162ff9e)
This commit is contained in:
parent
5376a4472a
commit
9132d5b1c5
2 changed files with 22 additions and 11 deletions
|
|
@ -2,6 +2,9 @@ source common.sh
|
|||
|
||||
clearStore
|
||||
|
||||
# Ensure "fake ssh" remote store works just as legacy fake ssh would.
|
||||
nix --store ssh-ng://localhost?remote-store=$TEST_ROOT/other-store doctor
|
||||
|
||||
startDaemon
|
||||
|
||||
storeCleared=1 NIX_REMOTE_=$NIX_REMOTE $SHELL ./user-envs.sh
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue