Pass GPG_TTY env var to the ssh binary

gpg-agent(1) can emulate the OpenSSH Agent protocol (which provides
pubkey-authentication using an authentication-capable OpenPGP key, in
addition to the usual identity files).  However for a console-based
password prompt to work, the 'GPG_TTY' environment variable needs to be
set to the current TTY.  Furthermore, curses-based password prompts also
require the 'TERM' environment variable to be set to the terminal type.

Gbp-Pq: Topic forward
Gbp-Pq: Name Pass-GPG_TTY-env-var-to-the-ssh-binary.patch
This commit is contained in:
Guilhem Moulin 2016-12-09 22:06:12 +01:00 committed by Cong Liu
parent 22e5b22189
commit 54c8afb277
1 changed files with 2 additions and 0 deletions

View File

@ -855,6 +855,8 @@ int virNetSocketNewConnectSSH(const char *nodename,
virCommandAddEnvPass(cmd, "KRB5CCNAME");
virCommandAddEnvPass(cmd, "SSH_AUTH_SOCK");
virCommandAddEnvPass(cmd, "SSH_ASKPASS");
virCommandAddEnvPass(cmd, "GPG_TTY");
virCommandAddEnvPass(cmd, "TERM");
virCommandAddEnvPass(cmd, "DISPLAY");
virCommandAddEnvPass(cmd, "XAUTHORITY");
virCommandClearCaps(cmd);