Mailing List Archive

[openssh] 01/01: upstream Don't reset signal handlers inside handlers.
This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 05046d907c211cb9b4cd21b8eff9e7a46cd6c5ab
Author: dtucker@openbsd.org <dtucker@openbsd.org>
Date: Sun Feb 11 21:16:56 2018 +0000

upstream Don't reset signal handlers inside handlers.

The signal handlers from the original ssh1 code on which OpenSSH
is based assume unreliable signals and reinstall their handlers.
Since OpenBSD (and pretty much every current system) has reliable
signals this is not needed. In the unlikely even that -portable
is still being used on such systems we will deal with it in the
compat layer. ok deraadt@

OpenBSD-Commit-ID: f53a1015cb6908431b92116130d285d71589612c
---
clientloop.c | 3 +--
serverloop.c | 5 +----
ssh.c | 4 +---
sshd.c | 5 +----
4 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/clientloop.c b/clientloop.c
index ed9bebdf..7bcf22e3 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.310 2018/01/23 05:27:21 djm Exp $ */
+/* $OpenBSD: clientloop.c,v 1.311 2018/02/11 21:16:56 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -210,7 +210,6 @@ static void
window_change_handler(int sig)
{
received_window_change_signal = 1;
- signal(SIGWINCH, window_change_handler);
}

/*
diff --git a/serverloop.c b/serverloop.c
index 9d789a21..e9bd9b5e 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: serverloop.c,v 1.203 2018/01/23 05:27:21 djm Exp $ */
+/* $OpenBSD: serverloop.c,v 1.204 2018/02/11 21:16:56 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -153,9 +153,6 @@ sigchld_handler(int sig)
{
int save_errno = errno;
child_terminated = 1;
-#ifndef _UNICOS
- mysignal(SIGCHLD, sigchld_handler);
-#endif
notify_parent();
errno = save_errno;
}
diff --git a/ssh.c b/ssh.c
index af4597f8..c0bdd38b 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.471 2018/01/23 05:27:21 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.472 2018/02/11 21:16:56 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2132,7 +2132,5 @@ main_sigchld_handler(int sig)
while ((pid = waitpid(-1, &status, WNOHANG)) > 0 ||
(pid < 0 && errno == EINTR))
;
-
- signal(sig, main_sigchld_handler);
errno = save_errno;
}
diff --git a/sshd.c b/sshd.c
index 77231c33..17931068 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.503 2018/01/23 20:00:58 stsp Exp $ */
+/* $OpenBSD: sshd.c,v 1.504 2018/02/11 21:16:56 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -283,7 +283,6 @@ sighup_handler(int sig)
int save_errno = errno;

received_sighup = 1;
- signal(SIGHUP, sighup_handler);
errno = save_errno;
}

@@ -333,8 +332,6 @@ main_sigchld_handler(int sig)
while ((pid = waitpid(-1, &status, WNOHANG)) > 0 ||
(pid < 0 && errno == EINTR))
;
-
- signal(SIGCHLD, main_sigchld_handler);
errno = save_errno;
}


--
To stop receiving notification emails like this one, please contact
djm@mindrot.org.
_______________________________________________
openssh-commits mailing list
openssh-commits@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-commits