summaryrefslogtreecommitdiff
path: root/sshconnect.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshconnect.c')
-rw-r--r--sshconnect.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sshconnect.c b/sshconnect.c
index 9f2412e0d..1e5b8ea5a 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect.c,v 1.328 2020/01/25 07:17:18 djm Exp $ */ 1/* $OpenBSD: sshconnect.c,v 1.329 2020/03/13 04:01:56 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1283,6 +1283,7 @@ ssh_login(struct ssh *ssh, Sensitive *sensitive, const char *orighost,
1283{ 1283{
1284 char *host; 1284 char *host;
1285 char *server_user, *local_user; 1285 char *server_user, *local_user;
1286 int r;
1286 1287
1287 local_user = xstrdup(pw->pw_name); 1288 local_user = xstrdup(pw->pw_name);
1288 server_user = options.user ? options.user : local_user; 1289 server_user = options.user ? options.user : local_user;
@@ -1292,8 +1293,8 @@ ssh_login(struct ssh *ssh, Sensitive *sensitive, const char *orighost,
1292 lowercase(host); 1293 lowercase(host);
1293 1294
1294 /* Exchange protocol version identification strings with the server. */ 1295 /* Exchange protocol version identification strings with the server. */
1295 if (kex_exchange_identification(ssh, timeout_ms, 1, NULL) != 0) 1296 if ((r = kex_exchange_identification(ssh, timeout_ms, 1, NULL)) != 0)
1296 cleanup_exit(255); /* error already logged */ 1297 sshpkt_fatal(ssh, r, "banner exchange");
1297 1298
1298 /* Put the connection into non-blocking mode. */ 1299 /* Put the connection into non-blocking mode. */
1299 ssh_packet_set_nonblocking(ssh); 1300 ssh_packet_set_nonblocking(ssh);