summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-09-12 09:52:46 +1000
committerDamien Miller <djm@mindrot.org>2002-09-12 09:52:46 +1000
commit789e95dbe931bad60cb5f91d995470f433f4e02b (patch)
treefc7a3a6b129ee0b4ebfc64185765acfabe84f757 /ssh.c
parentb5fdfaae13daa5340725ab9418943f1da3d9f7e8 (diff)
- stevesk@cvs.openbsd.org 2002/09/11 18:27:26
[authfd.c authfd.h ssh.c] don't connect to agent to test for presence if we've previously connected; ok markus@
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ssh.c b/ssh.c
index dcbf68d99..7cef5e5ac 100644
--- a/ssh.c
+++ b/ssh.c
@@ -40,7 +40,7 @@
40 */ 40 */
41 41
42#include "includes.h" 42#include "includes.h"
43RCSID("$OpenBSD: ssh.c,v 1.184 2002/08/29 19:49:42 stevesk Exp $"); 43RCSID("$OpenBSD: ssh.c,v 1.185 2002/09/11 18:27:26 stevesk Exp $");
44 44
45#include <openssl/evp.h> 45#include <openssl/evp.h>
46#include <openssl/err.h> 46#include <openssl/err.h>
@@ -829,11 +829,8 @@ check_agent_present(void)
829{ 829{
830 if (options.forward_agent) { 830 if (options.forward_agent) {
831 /* Clear agent forwarding if we don\'t have an agent. */ 831 /* Clear agent forwarding if we don\'t have an agent. */
832 int authfd = ssh_get_authentication_socket(); 832 if (!ssh_agent_present())
833 if (authfd < 0)
834 options.forward_agent = 0; 833 options.forward_agent = 0;
835 else
836 ssh_close_authentication_socket(authfd);
837 } 834 }
838} 835}
839 836