summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--channels.c6
-rw-r--r--session.c4
-rw-r--r--ssh-agent.c4
-rw-r--r--ssh.h5
-rw-r--r--sshd.c4
6 files changed, 17 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 648a8231a..cbc173b68 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,9 @@
14 rounding the time to 1 second. 14 rounding the time to 1 second.
15 * when the transfer is finished calculate the actual total speed 15 * when the transfer is finished calculate the actual total speed
16 rather than the current speed which is given during the transfer 16 rather than the current speed which is given during the transfer
17 - markus@cvs.openbsd.org 2003/12/02 17:01:15
18 [channels.c session.c ssh-agent.c ssh.h sshd.c]
19 use SSH_LISTEN_BACKLOG (=128) in listen(2).
17 20
1820031208 2120031208
19 - (tim) [configure.ac] Bug 770. Fix --without-rpath. 22 - (tim) [configure.ac] Bug 770. Fix --without-rpath.
@@ -1552,4 +1555,4 @@
1552 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. 1555 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
1553 Report from murple@murple.net, diagnosis from dtucker@zip.com.au 1556 Report from murple@murple.net, diagnosis from dtucker@zip.com.au
1554 1557
1555$Id: ChangeLog,v 1.3134 2003/12/09 08:07:13 dtucker Exp $ 1558$Id: ChangeLog,v 1.3135 2003/12/09 08:15:11 dtucker Exp $
diff --git a/channels.c b/channels.c
index 5a2605f91..14405bd4b 100644
--- a/channels.c
+++ b/channels.c
@@ -39,7 +39,7 @@
39 */ 39 */
40 40
41#include "includes.h" 41#include "includes.h"
42RCSID("$OpenBSD: channels.c,v 1.198 2003/11/21 11:57:03 djm Exp $"); 42RCSID("$OpenBSD: channels.c,v 1.199 2003/12/02 17:01:14 markus Exp $");
43 43
44#include "ssh.h" 44#include "ssh.h"
45#include "ssh1.h" 45#include "ssh1.h"
@@ -2195,7 +2195,7 @@ channel_setup_fwd_listener(int type, const char *listen_addr, u_short listen_por
2195 continue; 2195 continue;
2196 } 2196 }
2197 /* Start listening for connections on the socket. */ 2197 /* Start listening for connections on the socket. */
2198 if (listen(sock, 5) < 0) { 2198 if (listen(sock, SSH_LISTEN_BACKLOG) < 0) {
2199 error("listen: %.100s", strerror(errno)); 2199 error("listen: %.100s", strerror(errno));
2200 close(sock); 2200 close(sock);
2201 continue; 2201 continue;
@@ -2550,7 +2550,7 @@ x11_create_display_inet(int x11_display_offset, int x11_use_localhost,
2550 /* Start listening for connections on the socket. */ 2550 /* Start listening for connections on the socket. */
2551 for (n = 0; n < num_socks; n++) { 2551 for (n = 0; n < num_socks; n++) {
2552 sock = socks[n]; 2552 sock = socks[n];
2553 if (listen(sock, 5) < 0) { 2553 if (listen(sock, SSH_LISTEN_BACKLOG) < 0) {
2554 error("listen: %.100s", strerror(errno)); 2554 error("listen: %.100s", strerror(errno));
2555 close(sock); 2555 close(sock);
2556 return -1; 2556 return -1;
diff --git a/session.c b/session.c
index 63b7da1f0..00f8785f5 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
33 */ 33 */
34 34
35#include "includes.h" 35#include "includes.h"
36RCSID("$OpenBSD: session.c,v 1.168 2003/11/21 11:57:03 djm Exp $"); 36RCSID("$OpenBSD: session.c,v 1.169 2003/12/02 17:01:15 markus Exp $");
37 37
38#include "ssh.h" 38#include "ssh.h"
39#include "ssh1.h" 39#include "ssh1.h"
@@ -177,7 +177,7 @@ auth_input_request_forwarding(struct passwd * pw)
177 restore_uid(); 177 restore_uid();
178 178
179 /* Start listening on the socket. */ 179 /* Start listening on the socket. */
180 if (listen(sock, 5) < 0) 180 if (listen(sock, SSH_LISTEN_BACKLOG) < 0)
181 packet_disconnect("listen: %.100s", strerror(errno)); 181 packet_disconnect("listen: %.100s", strerror(errno));
182 182
183 /* Allocate a channel for the authentication agent socket. */ 183 /* Allocate a channel for the authentication agent socket. */
diff --git a/ssh-agent.c b/ssh-agent.c
index b1d603006..e5232fc9b 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -35,7 +35,7 @@
35 35
36#include "includes.h" 36#include "includes.h"
37#include "openbsd-compat/sys-queue.h" 37#include "openbsd-compat/sys-queue.h"
38RCSID("$OpenBSD: ssh-agent.c,v 1.116 2003/11/21 11:57:03 djm Exp $"); 38RCSID("$OpenBSD: ssh-agent.c,v 1.117 2003/12/02 17:01:15 markus Exp $");
39 39
40#include <openssl/evp.h> 40#include <openssl/evp.h>
41#include <openssl/md5.h> 41#include <openssl/md5.h>
@@ -1138,7 +1138,7 @@ main(int ac, char **av)
1138#ifdef HAVE_CYGWIN 1138#ifdef HAVE_CYGWIN
1139 umask(prev_mask); 1139 umask(prev_mask);
1140#endif 1140#endif
1141 if (listen(sock, 128) < 0) { 1141 if (listen(sock, SSH_LISTEN_BACKLOG) < 0) {
1142 perror("listen"); 1142 perror("listen");
1143 cleanup_exit(1); 1143 cleanup_exit(1);
1144 } 1144 }
diff --git a/ssh.h b/ssh.h
index e88b9b83e..a3b2ebbb5 100644
--- a/ssh.h
+++ b/ssh.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh.h,v 1.74 2003/09/01 13:52:18 markus Exp $ */ 1/* $OpenBSD: ssh.h,v 1.75 2003/12/02 17:01:15 markus Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -103,4 +103,7 @@
103/* Minimum modulus size (n) for RSA keys. */ 103/* Minimum modulus size (n) for RSA keys. */
104#define SSH_RSA_MINIMUM_MODULUS_SIZE 768 104#define SSH_RSA_MINIMUM_MODULUS_SIZE 768
105 105
106/* Listen backlog for sshd, ssh-agent and forwarding sockets */
107#define SSH_LISTEN_BACKLOG 128
108
106#endif /* SSH_H */ 109#endif /* SSH_H */
diff --git a/sshd.c b/sshd.c
index e92a13c5f..b45bc0abc 100644
--- a/sshd.c
+++ b/sshd.c
@@ -42,7 +42,7 @@
42 */ 42 */
43 43
44#include "includes.h" 44#include "includes.h"
45RCSID("$OpenBSD: sshd.c,v 1.281 2003/11/10 16:23:41 jakob Exp $"); 45RCSID("$OpenBSD: sshd.c,v 1.282 2003/12/02 17:01:15 markus Exp $");
46 46
47#include <openssl/dh.h> 47#include <openssl/dh.h>
48#include <openssl/bn.h> 48#include <openssl/bn.h>
@@ -1161,7 +1161,7 @@ main(int ac, char **av)
1161 1161
1162 /* Start listening on the port. */ 1162 /* Start listening on the port. */
1163 logit("Server listening on %s port %s.", ntop, strport); 1163 logit("Server listening on %s port %s.", ntop, strport);
1164 if (listen(listen_sock, 5) < 0) 1164 if (listen(listen_sock, SSH_LISTEN_BACKLOG) < 0)
1165 fatal("listen: %.100s", strerror(errno)); 1165 fatal("listen: %.100s", strerror(errno));
1166 1166
1167 } 1167 }