summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2015-01-14 20:05:27 +0000
committerdjm <djm@openbsd.org>2015-01-14 20:05:27 +0000
commitb7e9f6c7aaa7ed1f45b871f8b184da3bb8c4dc83 (patch)
treeea21d50ed049a0f147400d57c65af45c6498f71b /usr.bin/ssh/ssh.c
parentfix small regression: ssh-agent would return a success message (diff)
downloadwireguard-openbsd-b7e9f6c7aaa7ed1f45b871f8b184da3bb8c4dc83.tar.xz
wireguard-openbsd-b7e9f6c7aaa7ed1f45b871f8b184da3bb8c4dc83.zip
move authfd.c and its tentacles to the new buffer/key API;
ok markus@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r--usr.bin/ssh/ssh.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index 67513c47dad..62d5fc964c2 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.411 2015/01/08 10:15:45 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.412 2015/01/14 20:05:27 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -97,6 +97,7 @@
#include "uidswap.h"
#include "roaming.h"
#include "version.h"
+#include "ssherr.h"
#ifdef ENABLE_PKCS11
#include "ssh-pkcs11.h"
@@ -1452,10 +1453,16 @@ ssh_init_forwarding(void)
static void
check_agent_present(void)
{
+ int r;
+
if (options.forward_agent) {
/* Clear agent forwarding if we don't have an agent. */
- if (!ssh_agent_present())
+ if ((r = ssh_get_authentication_socket(NULL)) != 0) {
options.forward_agent = 0;
+ if (r != SSH_ERR_AGENT_NOT_PRESENT)
+ debug("ssh_get_authentication_socket: %s",
+ ssh_err(r));
+ }
}
}