1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 23:42:43 +01:00

nix-daemon: Pass on the user's $SSH_AUTH_SOCK to the SSH substituter

This commit is contained in:
Eelco Dolstra 2014-07-25 18:02:48 +02:00
parent 71a20d4d95
commit 67937907ca
4 changed files with 17 additions and 0 deletions

View file

@ -163,6 +163,8 @@ void RemoteStore::setOptions()
if (GET_PROTOCOL_MINOR(daemonVersion) >= 12) {
Settings::SettingsMap overrides = settings.getOverrides();
if (overrides["ssh-auth-sock"] == "")
overrides["ssh-auth-sock"] = getEnv("SSH_AUTH_SOCK");
writeInt(overrides.size(), to);
foreach (Settings::SettingsMap::iterator, i, overrides) {
writeString(i->first, to);