components/openssh/patches/048-maxstartups-log_dropped.patch
changeset 7060 6881211a7ba8
equal deleted inserted replaced
7059:f2f4b9922ef9 7060:6881211a7ba8
       
     1 #
       
     2 # When MaxStartups of unauthenticated concurrent connections is hit,
       
     3 # additional connections are dropped.
       
     4 #
       
     5 # Dropped connections should be logged. Server administrator should be able to
       
     6 # find this information and might be interested in details. 
       
     7 #
       
     8 # Patch source: in-house
       
     9 # Offered upstream:
       
    10 # https://bugzilla.mindrot.org/show_bug.cgi?id=2613
       
    11 #
       
    12 diff -pur old/sshd.c new/sshd.c
       
    13 --- old/sshd.c
       
    14 +++ new/sshd.c
       
    15 @@ -1419,7 +1419,8 @@ server_accept_loop(int *sock_in, int *so
       
    16  				continue;
       
    17  			}
       
    18  			if (drop_connection(startups) == 1) {
       
    19 -				debug("drop connection #%d", startups);
       
    20 +				logit("MaxStartups: dropping connection #%d",
       
    21 +				    startups);
       
    22  				close(*newsock);
       
    23  				continue;
       
    24  			}