mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-01 16:33:02 +01:00
agent: Fix UPDATESTARTUPTTY for ssh.
* agent/command-ssh.c (setup_ssh_env): Fix env setting. -- gniibe reported this to gnupg-devel on 2012-07-04: [...] (2) UPDATESTARTUPTTY doesn't work to switch TTY for pinentry for SSH. [...] Current implementation: In the function start_command_handler_ssh, the logic puts priority on ctrl->session_env which is initialized by agent_init_default_ctrl. There are always GPG_TTY and TERM defined, because lines around 968 in gpg-agent.c, it says: /* Make sure that we have a default ttyname. */ While UPDATESTARTUPTTY updates opt.startup_env, it doesn't affect at all. Here is a patch to point the issue. Tested and works for me. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
0c5d3da96a
commit
9f5578c29a
@ -3369,8 +3369,7 @@ setup_ssh_env (ctrl_t ctrl)
|
|||||||
const char *value;
|
const char *value;
|
||||||
|
|
||||||
for (idx=0; !err && names[idx]; idx++)
|
for (idx=0; !err && names[idx]; idx++)
|
||||||
if (!session_env_getenv (ctrl->session_env, names[idx])
|
if ((value = session_env_getenv (opt.startup_env, names[idx])))
|
||||||
&& (value = session_env_getenv (opt.startup_env, names[idx])))
|
|
||||||
err = session_env_setenv (ctrl->session_env, names[idx], value);
|
err = session_env_setenv (ctrl->session_env, names[idx], value);
|
||||||
|
|
||||||
if (!err && !ctrl->lc_ctype && opt.startup_lc_ctype)
|
if (!err && !ctrl->lc_ctype && opt.startup_lc_ctype)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user