diff options
Diffstat (limited to 'sshconnect.c')
-rw-r--r-- | sshconnect.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sshconnect.c b/sshconnect.c index 4711af782..af08be415 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 |
@@ -1276,6 +1276,7 @@ ssh_login(struct ssh *ssh, Sensitive *sensitive, const char *orighost, | |||
1276 | { | 1276 | { |
1277 | char *host; | 1277 | char *host; |
1278 | char *server_user, *local_user; | 1278 | char *server_user, *local_user; |
1279 | int r; | ||
1279 | 1280 | ||
1280 | local_user = xstrdup(pw->pw_name); | 1281 | local_user = xstrdup(pw->pw_name); |
1281 | server_user = options.user ? options.user : local_user; | 1282 | server_user = options.user ? options.user : local_user; |
@@ -1285,8 +1286,8 @@ ssh_login(struct ssh *ssh, Sensitive *sensitive, const char *orighost, | |||
1285 | lowercase(host); | 1286 | lowercase(host); |
1286 | 1287 | ||
1287 | /* Exchange protocol version identification strings with the server. */ | 1288 | /* Exchange protocol version identification strings with the server. */ |
1288 | if (kex_exchange_identification(ssh, timeout_ms, NULL) != 0) | 1289 | if ((r = kex_exchange_identification(ssh, timeout_ms, NULL)) != 0) |
1289 | cleanup_exit(255); /* error already logged */ | 1290 | sshpkt_fatal(ssh, r, "banner exchange"); |
1290 | 1291 | ||
1291 | /* Put the connection into non-blocking mode. */ | 1292 | /* Put the connection into non-blocking mode. */ |
1292 | ssh_packet_set_nonblocking(ssh); | 1293 | ssh_packet_set_nonblocking(ssh); |