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

@ -101,6 +101,11 @@ void run(Strings args)
std::cout << std::endl;
/* Pass on the location of the daemon client's SSH authentication
socket. */
string sshAuthSock = settings.get("ssh-auth-sock");
if (sshAuthSock != "") setenv("SSH_AUTH_SOCK", sshAuthSock.c_str(), 1);
string host = settings.sshSubstituterHosts.front();
std::pair<FdSink, FdSource> pipes = connect(host);