Control: tags -1 + patch Am 26.12.2015 um 17:27 schrieb Colin Watson: > Michael, this looks like a regression from your readiness notification > changes that I applied recently. Please could you have a look? Attached is a patch on top of the existing one, which fixes the issue by running the sd_notify() call only in the main process and not the spawned off children. It moves it right next to the existing SIGSTOP readiness-signal. Regards, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
From 60aab01587f4974261882b7c4066750f34522ea4 Mon Sep 17 00:00:00 2001
From: Michael Biebl <biebl@debian.org>
Date: Sun, 27 Dec 2015 15:58:03 +0100
Subject: [PATCH] Call sd_notify() only for the main process
Move the sd_notify() call next to the existing SIGSTOP readiness
notification so it is only run in the main process and not for the
spawned off children.
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809035
---
sshd.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/sshd.c b/sshd.c
index 4d28dc0..19ee92b 100644
--- a/sshd.c
+++ b/sshd.c
@@ -2015,11 +2015,6 @@ main(int ac, char **av)
/* ignore SIGPIPE */
signal(SIGPIPE, SIG_IGN);
-#ifdef HAVE_SYSTEMD
- /* Signal systemd that we are ready to accept connections */
- sd_notify(0, "READY=1");
-#endif
-
/* Get a connection, either from inetd or a listening TCP socket */
if (inetd_flag) {
server_accept_inetd(&sock_in, &sock_out);
@@ -2061,6 +2056,11 @@ main(int ac, char **av)
unsetenv("SSH_SIGSTOP");
}
+#ifdef HAVE_SYSTEMD
+ /* Signal systemd that we are ready to accept connections */
+ sd_notify(0, "READY=1");
+#endif
+
/* Accept a connection and return in a forked child */
server_accept_loop(&sock_in, &sock_out,
&newsock, config_s);
--
2.6.4
Attachment:
signature.asc
Description: OpenPGP digital signature