mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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 <wk@gnupg.org>
This commit is contained in:
parent
aad8963f7b
commit
14601eacb5
5 changed files with 43 additions and 35 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue