mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
rpc: Pass GPG_TTY and TERM environment variables
gpg-agent can be used instead of ssh-agent to authenticate against an SSH server, but in order to do so the GPG_TTY and TERM environment variables need to be passed through. For obvious reasons, we avoid doing that when no_tty=1 is found in the connection URI. https://bugs.debian.org/843863 https://gitlab.com/libvirt/libvirt/-/merge_requests/290 Thanks: Guilhem Moulin <guilhem@guilhem.org> Thanks: Kunwu Chan <chentao@kylinos.cn> Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
3ad5817053
commit
65bf8fc9cf
@ -843,6 +843,11 @@ int virNetSocketNewConnectSSH(const char *nodename,
|
||||
virCommandAddEnvPass(cmd, "OPENSSL_CONF");
|
||||
virCommandAddEnvPass(cmd, "DISPLAY");
|
||||
virCommandAddEnvPass(cmd, "XAUTHORITY");
|
||||
if (!noTTY) {
|
||||
/* Needed for gpg-agent's curses-based authentication prompt */
|
||||
virCommandAddEnvPass(cmd, "GPG_TTY");
|
||||
virCommandAddEnvPass(cmd, "TERM");
|
||||
}
|
||||
virCommandClearCaps(cmd);
|
||||
|
||||
if (service)
|
||||
|
Loading…
Reference in New Issue
Block a user