summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
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