From 14601eacb51f6c8a60d3d57aee1be11debd94c68 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 19 Dec 2014 13:07:09 +0100 Subject: agent: Keep the session environment for restricted connections. * agent/command-ssh.c (setup_ssh_env): Move code to ... * agent/gpg-agent.c (agent_copy_startup_env): .. new function. Change calllers. * agent/command.c (start_command_handler): Call that fucntion for restricted connections. -- A remote connection is and should not be able to setup the local session environment. However, unless --keep-display is used we would be left without an environment and thus pinentry can't be used. The fix is the same as used for ssh-agent connection: We use the default environment as used at the startup of the agent. Signed-off-by: Werner Koch --- agent/agent.h | 1 + 1 file changed, 1 insertion(+) (limited to 'agent/agent.h') diff --git a/agent/agent.h b/agent/agent.h index a1663cd56..c7c65afa7 100644 --- a/agent/agent.h +++ b/agent/agent.h @@ -278,6 +278,7 @@ typedef int (*lookup_ttl_t)(const char *hexgrip); /*-- gpg-agent.c --*/ void agent_exit (int rc) JNLIB_GCC_A_NR; /* Also implemented in other tools */ +gpg_error_t agent_copy_startup_env (ctrl_t ctrl); const char *get_agent_socket_name (void); const char *get_agent_ssh_socket_name (void); #ifdef HAVE_W32_SYSTEM -- cgit v1.2.3