summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoritojun <itojun@openbsd.org>2002-09-17 07:47:02 +0000
committeritojun <itojun@openbsd.org>2002-09-17 07:47:02 +0000
commit9f25bcd6f386252f4e53348d28e6c2178b5ec2fa (patch)
tree3c46df30878592eeb97d386c045208fb9a83e038
parenttypo (diff)
downloadwireguard-openbsd-9f25bcd6f386252f4e53348d28e6c2178b5ec2fa.tar.xz
wireguard-openbsd-9f25bcd6f386252f4e53348d28e6c2178b5ec2fa.zip
don't quit while creating X11 listening socket.
http://mail-index.netbsd.org/current-users/2002/09/16/0005.html got from portable. markus ok
-rw-r--r--usr.bin/ssh/channels.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c
index 0b0a87587f6..17b773b7b27 100644
--- a/usr.bin/ssh/channels.c
+++ b/usr.bin/ssh/channels.c
@@ -39,7 +39,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: channels.c,v 1.182 2002/09/13 19:23:09 stevesk Exp $");
+RCSID("$OpenBSD: channels.c,v 1.183 2002/09/17 07:47:02 itojun Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -2373,6 +2373,10 @@ x11_create_display_inet(int x11_display_offset, int x11_use_localhost,
if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
debug("bind port %d: %.100s", port, strerror(errno));
close(sock);
+
+ if (ai->ai_next)
+ continue;
+
for (n = 0; n < num_socks; n++) {
close(socks[n]);
}