aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2016-03-02 15:41:04 +0000
committerJustus Winter <[email protected]>2016-03-02 16:00:22 +0000
commit3e1b451c5d330b81561436a600bdaa9fbacc1ba1 (patch)
tree0e7334cae46d0e7eef0d97077146505fab5fecfa
parentg10: Make sure to have the directory for trustdb. (diff)
downloadgnupg-3e1b451c5d330b81561436a600bdaa9fbacc1ba1.tar.gz
gnupg-3e1b451c5d330b81561436a600bdaa9fbacc1ba1.zip
agent: Do not remove the ssh socket.
* agent/gpg-agent.c (create_server_socket): Also inhibit the removal of the ssh socket if another agent process is already running. GnuPG modern is not affected. GnuPG-bug-id: 2258 Signed-off-by: Justus Winter <[email protected]>
-rw-r--r--agent/gpg-agent.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index 479f91802..3b4a181bb 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -1586,6 +1586,8 @@ create_server_socket (char *name, int is_ssh, assuan_sock_nonce_t *nonce)
log_error (_("a gpg-agent is already running - "
"not starting a new one\n"));
*name = 0; /* Inhibit removal of the socket by cleanup(). */
+ if (opt.ssh_support)
+ *socket_name_ssh = 0; /* Likewise for the ssh socket. */
assuan_sock_close (fd);
agent_exit (2);
}