virnetsocket: pass XAUTORITY for ssh connection

When spawning an ssh connection, the environment variables
DISPLAY, SSH_ASKPASS, ... are passed. However XAUTHORITY,
which is necessary if the .Xauthority is in a non default
place, was not passed.

Signed-off-by: Christian Franke <nobody@nowhere.ws>
This commit is contained in:
Christian Franke 2011-11-28 13:15:25 +01:00 committed by Eric Blake
parent 8078a90a24
commit d360795d60
2 changed files with 2 additions and 0 deletions

View File

@ -209,6 +209,7 @@ Patches have also been contributed by:
Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Chang Liu <lingjiao.lc@taobao.com>
Lorin Hochstein <lorin@isi.edu>
Christian Franke <nobody@nowhere.ws>
[....send patches to get your name here....]

View File

@ -628,6 +628,7 @@ int virNetSocketNewConnectSSH(const char *nodename,
virCommandAddEnvPass(cmd, "SSH_AUTH_SOCK");
virCommandAddEnvPass(cmd, "SSH_ASKPASS");
virCommandAddEnvPass(cmd, "DISPLAY");
virCommandAddEnvPass(cmd, "XAUTHORITY");
virCommandClearCaps(cmd);
if (service)