mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-08 12:44:23 +01:00
agent: Not remove SSH socket when already running.
* agent/gpg-agent.c (main): Defer setting of socket_name_ssh to avoid removal of the socket when it will die in create_server_socket for socket_name. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
9c731bbedf
commit
0ee66a6f66
@ -1045,13 +1045,14 @@ main (int argc, char **argv )
|
|||||||
/* Create the sockets. */
|
/* Create the sockets. */
|
||||||
socket_name = create_socket_name
|
socket_name = create_socket_name
|
||||||
(GPG_AGENT_SOCK_NAME, "gpg-XXXXXX/"GPG_AGENT_SOCK_NAME);
|
(GPG_AGENT_SOCK_NAME, "gpg-XXXXXX/"GPG_AGENT_SOCK_NAME);
|
||||||
if (opt.ssh_support)
|
|
||||||
socket_name_ssh = create_socket_name
|
|
||||||
(GPG_AGENT_SSH_SOCK_NAME, "gpg-XXXXXX/"GPG_AGENT_SSH_SOCK_NAME);
|
|
||||||
|
|
||||||
fd = create_server_socket (socket_name, 0, &socket_nonce);
|
fd = create_server_socket (socket_name, 0, &socket_nonce);
|
||||||
if (opt.ssh_support)
|
if (opt.ssh_support)
|
||||||
fd_ssh = create_server_socket (socket_name_ssh, 1, &socket_nonce_ssh);
|
{
|
||||||
|
socket_name_ssh = create_socket_name
|
||||||
|
(GPG_AGENT_SSH_SOCK_NAME, "gpg-XXXXXX/"GPG_AGENT_SSH_SOCK_NAME);
|
||||||
|
fd_ssh = create_server_socket (socket_name_ssh, 1, &socket_nonce_ssh);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
fd_ssh = GNUPG_INVALID_FD;
|
fd_ssh = GNUPG_INVALID_FD;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user