summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2020-03-13 03:24:50 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2020-03-13 03:24:50 +0000
commit4d9673d8879ffff36aa1a7088592df10b6d3bf1e (patch)
treea3c388b5bd23cd1a134f774d6ac36becdc1c2727 /usr.bin
parente093848792382bc33e1b34da7f8a0acda6754806 (diff)
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@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/sshd.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c
index d9e2fb0d6a2..cb7f20729c6 100644
--- a/usr.bin/ssh/sshd.c
+++ b/usr.bin/ssh/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.550 2020/03/13 03:17:07 djm Exp $ */
+/* $OpenBSD: sshd.c,v 1.551 2020/03/13 03:24:49 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -294,7 +294,6 @@ sighup_restart(void)
unlink(options.pid_file);
close_listen_socks();
close_startup_pipes();
- alarm(0); /* alarm timer persists across exec */
ssh_signal(SIGHUP, SIG_IGN); /* will be restored after exec */
execv(saved_argv[0], saved_argv);
logit("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0],
@@ -1941,12 +1940,7 @@ main(int ac, char **av)
fcntl(sock_out, F_SETFD, FD_CLOEXEC);
fcntl(sock_in, F_SETFD, FD_CLOEXEC);
- /*
- * Disable the key regeneration alarm. We will not regenerate the
- * key since we are no longer in a position to give it to anyone. We
- * will not restart on SIGHUP since it no longer makes sense.
- */
- alarm(0);
+ /* We will not restart on SIGHUP since it no longer makes sense. */
ssh_signal(SIGALRM, SIG_DFL);
ssh_signal(SIGHUP, SIG_DFL);
ssh_signal(SIGTERM, SIG_DFL);