summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2020-03-13 03:24:49 +0000
committerDamien Miller <djm@mindrot.org>2020-03-14 19:39:30 +1100
commiteef88418f9e5e51910af3c5b23b5606ebc17af55 (patch)
tree0b121a89e84e4705e8e9d740842ad34cdfd6ad91 /sshd.c
parentd081f017c20a3564255873ed99fd7d024cac540f (diff)
upstream: Don't clear alarm timers in listening sshd. Previously
these timers were used for regenerating the SSH1 ephemeral host keys but those are now gone so there's no need to clear the timers either. ok deraadt@ OpenBSD-Commit-ID: 280d2b885e4a1ce404632e8cc38fcb17be7dafc0
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sshd.c b/sshd.c
index c85df4da9..e59077911 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.550 2020/03/13 03:17:07 djm Exp $ */ 1/* $OpenBSD: sshd.c,v 1.551 2020/03/13 03:24:49 dtucker 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
@@ -317,7 +317,6 @@ sighup_restart(void)
317 platform_pre_restart(); 317 platform_pre_restart();
318 close_listen_socks(); 318 close_listen_socks();
319 close_startup_pipes(); 319 close_startup_pipes();
320 alarm(0); /* alarm timer persists across exec */
321 ssh_signal(SIGHUP, SIG_IGN); /* will be restored after exec */ 320 ssh_signal(SIGHUP, SIG_IGN); /* will be restored after exec */
322 execv(saved_argv[0], saved_argv); 321 execv(saved_argv[0], saved_argv);
323 logit("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0], 322 logit("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0],
@@ -2085,12 +2084,7 @@ main(int ac, char **av)
2085 fcntl(sock_out, F_SETFD, FD_CLOEXEC); 2084 fcntl(sock_out, F_SETFD, FD_CLOEXEC);
2086 fcntl(sock_in, F_SETFD, FD_CLOEXEC); 2085 fcntl(sock_in, F_SETFD, FD_CLOEXEC);
2087 2086
2088 /* 2087 /* We will not restart on SIGHUP since it no longer makes sense. */
2089 * Disable the key regeneration alarm. We will not regenerate the
2090 * key since we are no longer in a position to give it to anyone. We
2091 * will not restart on SIGHUP since it no longer makes sense.
2092 */
2093 alarm(0);
2094 ssh_signal(SIGALRM, SIG_DFL); 2088 ssh_signal(SIGALRM, SIG_DFL);
2095 ssh_signal(SIGHUP, SIG_DFL); 2089 ssh_signal(SIGHUP, SIG_DFL);
2096 ssh_signal(SIGTERM, SIG_DFL); 2090 ssh_signal(SIGTERM, SIG_DFL);