1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-19 10:50:24 -04:00

Filter out client-only-settings on the daemon

This commit is contained in:
Eelco Dolstra 2024-09-03 17:46:20 +02:00
parent 2ac15b3bcf
commit 120ca30816
2 changed files with 13 additions and 1 deletions

View file

@ -238,9 +238,13 @@ struct ClientSettings
return true;
};
auto clientOnlySettings = settings.clientOnlySettings.get();
try {
if (name == "ssh-auth-sock") // obsolete
;
else if (clientOnlySettings.contains(name))
;
else if (name == experimentalFeatureSettings.experimentalFeatures.name) {
// We dont want to forward the experimental features to
// the daemon, as that could cause some pretty weird stuff

View file

@ -37,7 +37,7 @@ cmp $TEST_ROOT/d1 $TEST_ROOT/d2
killDaemon
# Test 'client-only-settings'.
# Test 'client-only-settings' on the client.
extraDaemonFlags=("--trusted-users" "")
startDaemon
nix store info --netrc-file /foo 2>&1 | grepQuiet "ignoring the client-specified setting 'netrc-file'"
@ -45,3 +45,11 @@ if nix store info --netrc-file /foo --client-only-settings netrc-file 2>&1 | gre
exit 1
fi
killDaemon
# Test 'client-only-settings' on the daemon.
extraDaemonFlags=("--trusted-users" "" "--option" "client-only-settings" "netrc-file")
startDaemon
if nix store info --netrc-file /foo 2>&1 | grep "ignoring the client-specified setting 'netrc-file'"; then
exit 1
fi
killDaemon