summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordtucker <dtucker>2003-12-09 08:15:11 +0000
committerdtucker <dtucker>2003-12-09 08:15:11 +0000
commitde6a1d61dd93a25e35dada273712939a16d821e3 (patch)
tree8e855f87441956e16df7c31aa6259dc564965f11
parent432713f01a0dde4e7a2ac14f6520e69a1c20ad76 (diff)
downloadopenssh-de6a1d61dd93a25e35dada273712939a16d821e3.tar.gz
- markus@cvs.openbsd.org 2003/12/02 17:01:15
[channels.c session.c ssh-agent.c ssh.h sshd.c] use SSH_LISTEN_BACKLOG (=128) in listen(2).
-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 648a8231..cbc173b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,9 @@
rounding the time to 1 second.
* when the transfer is finished calculate the actual total speed
rather than the current speed which is given during the transfer
+ - markus@cvs.openbsd.org 2003/12/02 17:01:15
+ [channels.c session.c ssh-agent.c ssh.h sshd.c]
+ use SSH_LISTEN_BACKLOG (=128) in listen(2).
20031208
- (tim) [configure.ac] Bug 770. Fix --without-rpath.
@@ -1552,4 +1555,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
-$Id: ChangeLog,v 1.3134 2003/12/09 08:07:13 dtucker Exp $
+$Id: ChangeLog,v 1.3135 2003/12/09 08:15:11 dtucker Exp $
diff --git a/channels.c b/channels.c
index 5a2605f9..14405bd4 100644
--- a/channels.c
+++ b/channels.c
@@ -39,7 +39,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: channels.c,v 1.198 2003/11/21 11:57:03 djm Exp $");
+RCSID("$OpenBSD: channels.c,v 1.199 2003/12/02 17:01:14 markus Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -2195,7 +2195,7 @@ channel_setup_fwd_listener(int type, const char *listen_addr, u_short listen_por
continue;
}
/* Start listening for connections on the socket. */
- if (listen(sock, 5) < 0) {
+ if (listen(sock, SSH_LISTEN_BACKLOG) < 0) {
error("listen: %.100s", strerror(errno));
close(sock);
continue;
@@ -2550,7 +2550,7 @@ x11_create_display_inet(int x11_display_offset, int x11_use_localhost,
/* Start listening for connections on the socket. */
for (n = 0; n < num_socks; n++) {
sock = socks[n];
- if (listen(sock, 5) < 0) {
+ if (listen(sock, SSH_LISTEN_BACKLOG) < 0) {
error("listen: %.100s", strerror(errno));
close(sock);
return -1;
diff --git a/session.c b/session.c
index 63b7da1f..00f8785f 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: session.c,v 1.168 2003/11/21 11:57:03 djm Exp $");
+RCSID("$OpenBSD: session.c,v 1.169 2003/12/02 17:01:15 markus Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -177,7 +177,7 @@ auth_input_request_forwarding(struct passwd * pw)
restore_uid();
/* Start listening on the socket. */
- if (listen(sock, 5) < 0)
+ if (listen(sock, SSH_LISTEN_BACKLOG) < 0)
packet_disconnect("listen: %.100s", strerror(errno));
/* Allocate a channel for the authentication agent socket. */
diff --git a/ssh-agent.c b/ssh-agent.c
index b1d60300..e5232fc9 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -35,7 +35,7 @@
#include "includes.h"
#include "openbsd-compat/sys-queue.h"
-RCSID("$OpenBSD: ssh-agent.c,v 1.116 2003/11/21 11:57:03 djm Exp $");
+RCSID("$OpenBSD: ssh-agent.c,v 1.117 2003/12/02 17:01:15 markus Exp $");
#include <openssl/evp.h>
#include <openssl/md5.h>
@@ -1138,7 +1138,7 @@ main(int ac, char **av)
#ifdef HAVE_CYGWIN
umask(prev_mask);
#endif
- if (listen(sock, 128) < 0) {
+ if (listen(sock, SSH_LISTEN_BACKLOG) < 0) {
perror("listen");
cleanup_exit(1);
}
diff --git a/ssh.h b/ssh.h
index e88b9b83..a3b2ebbb 100644
--- a/ssh.h
+++ b/ssh.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.h,v 1.74 2003/09/01 13:52:18 markus Exp $ */
+/* $OpenBSD: ssh.h,v 1.75 2003/12/02 17:01:15 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -103,4 +103,7 @@
/* Minimum modulus size (n) for RSA keys. */
#define SSH_RSA_MINIMUM_MODULUS_SIZE 768
+/* Listen backlog for sshd, ssh-agent and forwarding sockets */
+#define SSH_LISTEN_BACKLOG 128
+
#endif /* SSH_H */
diff --git a/sshd.c b/sshd.c
index e92a13c5..b45bc0ab 100644
--- a/sshd.c
+++ b/sshd.c
@@ -42,7 +42,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshd.c,v 1.281 2003/11/10 16:23:41 jakob Exp $");
+RCSID("$OpenBSD: sshd.c,v 1.282 2003/12/02 17:01:15 markus Exp $");
#include <openssl/dh.h>
#include <openssl/bn.h>
@@ -1161,7 +1161,7 @@ main(int ac, char **av)
/* Start listening on the port. */
logit("Server listening on %s port %s.", ntop, strport);
- if (listen(listen_sock, 5) < 0)
+ if (listen(listen_sock, SSH_LISTEN_BACKLOG) < 0)
fatal("listen: %.100s", strerror(errno));
}