summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2015-01-15 11:04:37 +0000
committerDamien Miller <djm@cvs.openbsd.org>2015-01-15 11:04:37 +0000
commitc490249a99704bee072d377f3ac48b48af06a4e1 (patch)
tree130280aee7677b36776d841e13daca54a93114fc /usr.bin
parent620922eafcbc885552289a75f5e3b532715bb0b7 (diff)
fix regression reported by brad@ for passworded keys without
agent present
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/sshconnect2.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c
index 532bba82fc7..d3c1729602c 100644
--- a/usr.bin/ssh/sshconnect2.c
+++ b/usr.bin/ssh/sshconnect2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect2.c,v 1.214 2015/01/14 20:05:27 djm Exp $ */
+/* $OpenBSD: sshconnect2.c,v 1.215 2015/01/15 11:04:36 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -396,6 +396,7 @@ ssh_userauth2(const char *local_user, const char *server_user, char *host,
authctxt.methoddata = NULL;
authctxt.sensitive = sensitive;
authctxt.info_req_seen = 0;
+ authctxt.agent_fd = -1;
if (authctxt.method == NULL)
fatal("ssh_userauth2: internal error: cannot send userauth none request");
@@ -1102,7 +1103,7 @@ load_identity_file(char *filename, int userprovided)
{
Key *private;
char prompt[300], *passphrase;
- int r, perm_ok = 0, quit, i;
+ int r, perm_ok = 0, quit = 0, i;
struct stat st;
if (stat(filename, &st) < 0) {
@@ -1132,7 +1133,8 @@ load_identity_file(char *filename, int userprovided)
quit = 1;
break;
}
- debug2("bad passphrase given, try again...");
+ if (i != 0)
+ debug2("bad passphrase given, try again...");
break;
case SSH_ERR_SYSTEM_ERROR:
if (errno == ENOENT) {