[openssh-commits] [openssh] 02/02: upstream: expose the number of currently-authenticating connections

git+noreply at mindrot.org git+noreply at mindrot.org
Wed Jan 22 09:42:09 AEDT 2020


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 70d38c3cfd4550e8ee66cc3bf1b91aa339c91df5
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Tue Jan 21 22:39:57 2020 +0000

    upstream: expose the number of currently-authenticating connections
    
    along with the MaxStartups limit in the proctitle; suggestion from Philipp
    Marek, w/ feedback from Craig Miskell ok dtucker@
    
    OpenBSD-Commit-ID: a4a6db2dc1641a5df8eddf7d6652176e359dffb3
---
 sshd.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/sshd.c b/sshd.c
index 0cf13a74..46f693a8 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.542 2019/12/15 18:57:30 djm Exp $ */
+/* $OpenBSD: sshd.c,v 1.543 2020/01/21 22:39:57 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -1059,7 +1059,7 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s)
 {
 	fd_set *fdset;
 	int i, j, ret, maxfd;
-	int startups = 0, listening = 0, lameduck = 0;
+	int ostartups = -1, startups = 0, listening = 0, lameduck = 0;
 	int startup_p[2] = { -1 , -1 };
 	char c = 0;
 	struct sockaddr_storage from;
@@ -1084,6 +1084,12 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s)
 	 * the daemon is killed with a signal.
 	 */
 	for (;;) {
+		if (ostartups != startups) {
+			setproctitle("[listener] %d of %d-%d startups",
+			    startups, options.max_startups_begin,
+			    options.max_startups);
+			ostartups = startups;
+		}
 		if (received_sighup) {
 			if (!lameduck) {
 				debug("Received SIGHUP; waiting for children");

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list