diff options
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 18 |
1 files changed, 6 insertions, 12 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshd.c,v 1.549 2020/01/31 23:13:04 djm Exp $ */ | 1 | /* $OpenBSD: sshd.c,v 1.552 2020/03/13 04:01:57 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 |
@@ -328,7 +328,6 @@ sighup_restart(void) | |||
328 | platform_pre_restart(); | 328 | platform_pre_restart(); |
329 | close_listen_socks(); | 329 | close_listen_socks(); |
330 | close_startup_pipes(); | 330 | close_startup_pipes(); |
331 | alarm(0); /* alarm timer persists across exec */ | ||
332 | ssh_signal(SIGHUP, SIG_IGN); /* will be restored after exec */ | 331 | ssh_signal(SIGHUP, SIG_IGN); /* will be restored after exec */ |
333 | execv(saved_argv[0], saved_argv); | 332 | execv(saved_argv[0], saved_argv); |
334 | logit("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0], | 333 | logit("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0], |
@@ -1121,7 +1120,7 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s) | |||
1121 | for (i = 0; i < num_listen_socks; i++) | 1120 | for (i = 0; i < num_listen_socks; i++) |
1122 | if (listen_socks[i] > maxfd) | 1121 | if (listen_socks[i] > maxfd) |
1123 | maxfd = listen_socks[i]; | 1122 | maxfd = listen_socks[i]; |
1124 | /* pipes connected to unauthenticated childs */ | 1123 | /* pipes connected to unauthenticated child sshd processes */ |
1125 | startup_pipes = xcalloc(options.max_startups, sizeof(int)); | 1124 | startup_pipes = xcalloc(options.max_startups, sizeof(int)); |
1126 | startup_flags = xcalloc(options.max_startups, sizeof(int)); | 1125 | startup_flags = xcalloc(options.max_startups, sizeof(int)); |
1127 | for (i = 0; i < options.max_startups; i++) | 1126 | for (i = 0; i < options.max_startups; i++) |
@@ -2102,12 +2101,7 @@ main(int ac, char **av) | |||
2102 | fcntl(sock_out, F_SETFD, FD_CLOEXEC); | 2101 | fcntl(sock_out, F_SETFD, FD_CLOEXEC); |
2103 | fcntl(sock_in, F_SETFD, FD_CLOEXEC); | 2102 | fcntl(sock_in, F_SETFD, FD_CLOEXEC); |
2104 | 2103 | ||
2105 | /* | 2104 | /* We will not restart on SIGHUP since it no longer makes sense. */ |
2106 | * Disable the key regeneration alarm. We will not regenerate the | ||
2107 | * key since we are no longer in a position to give it to anyone. We | ||
2108 | * will not restart on SIGHUP since it no longer makes sense. | ||
2109 | */ | ||
2110 | alarm(0); | ||
2111 | ssh_signal(SIGALRM, SIG_DFL); | 2105 | ssh_signal(SIGALRM, SIG_DFL); |
2112 | ssh_signal(SIGHUP, SIG_DFL); | 2106 | ssh_signal(SIGHUP, SIG_DFL); |
2113 | ssh_signal(SIGTERM, SIG_DFL); | 2107 | ssh_signal(SIGTERM, SIG_DFL); |
@@ -2196,9 +2190,9 @@ main(int ac, char **av) | |||
2196 | if (!debug_flag) | 2190 | if (!debug_flag) |
2197 | alarm(options.login_grace_time); | 2191 | alarm(options.login_grace_time); |
2198 | 2192 | ||
2199 | if (kex_exchange_identification(ssh, -1, options.debian_banner, | 2193 | if ((r = kex_exchange_identification(ssh, -1, options.debian_banner, |
2200 | options.version_addendum) != 0) | 2194 | options.version_addendum)) != 0) |
2201 | cleanup_exit(255); /* error already logged */ | 2195 | sshpkt_fatal(ssh, r, "banner exchange"); |
2202 | 2196 | ||
2203 | ssh_packet_set_nonblocking(ssh); | 2197 | ssh_packet_set_nonblocking(ssh); |
2204 | 2198 | ||