summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authorstevesk <stevesk@openbsd.org>2002-09-11 18:27:25 +0000
committerstevesk <stevesk@openbsd.org>2002-09-11 18:27:25 +0000
commit98d71954c932b12226a1536d3a0d80778e54c3d6 (patch)
tree6fe60ca5e5bd2de0924937db3079a791cd5efed8 /usr.bin/ssh/ssh.c
parentadd agent and X11 forwarding warning text from ssh_config.5; ok markus@ (diff)
downloadwireguard-openbsd-98d71954c932b12226a1536d3a0d80778e54c3d6.tar.xz
wireguard-openbsd-98d71954c932b12226a1536d3a0d80778e54c3d6.zip
don't connect to agent to test for presence if we've previously
connected; ok markus@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r--usr.bin/ssh/ssh.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index 1994f05f07f..8aef4a9fc03 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -40,7 +40,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.184 2002/08/29 19:49:42 stevesk Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.185 2002/09/11 18:27:26 stevesk Exp $");
#include <openssl/evp.h>
#include <openssl/err.h>
@@ -805,11 +805,8 @@ check_agent_present(void)
{
if (options.forward_agent) {
/* Clear agent forwarding if we don\'t have an agent. */
- int authfd = ssh_get_authentication_socket();
- if (authfd < 0)
+ if (!ssh_agent_present())
options.forward_agent = 0;
- else
- ssh_close_authentication_socket(authfd);
}
}