fe873a1c10
next round of patches - allow X forwarding over IPv4 when IPv6 sockets is not available [openssh-7.2p2-X_forward_with_disabled_ipv6.patch] - do not write PID file when not daemonizing [openssh-7.2p2-no_fork-no_pid_file.patch] - use correct options when invoking login [openssh-7.2p2-login_options.patch] - helper application for retrieving users' public keys from an LDAP server [openssh-7.2p2-ldap.patch] - allow forcing permissions over sftp [openssh-7.2p2-sftp_force_permissions.patch] - do not perform run-time checks for OpenSSL API/ABI change [openssh-7.2p2-disable-openssl-abi-check.patch] - suggest commands for cleaning known hosts file [openssh-7.2p2-host_ident.patch] - sftp home chroot patch [openssh-7.2p2-sftp_homechroot.patch] - ssh sessions auditing [openssh-7.2p2-audit.patch] - enable seccomp sandbox on additional architectures [openssh-7.2p2-additional_seccomp_archs.patch] OBS-URL: https://build.opensuse.org/request/show/432093 OBS-URL: https://build.opensuse.org/package/show/network/openssh?expand=0&rev=112
35 lines
958 B
Diff
35 lines
958 B
Diff
# HG changeset patch
|
|
# Parent 3d4efb38a918055f977a08aa7d1486a04bee6e11
|
|
Do not throw away already open sockets for X11 forwarding if another socket
|
|
family is not available for bind()
|
|
|
|
diff --git a/openssh-7.2p2/channels.c b/openssh-7.2p2/channels.c
|
|
--- a/openssh-7.2p2/channels.c
|
|
+++ b/openssh-7.2p2/channels.c
|
|
@@ -3937,22 +3937,24 @@ x11_create_display_inet(int x11_display_
|
|
}
|
|
if (ai->ai_family == AF_INET6)
|
|
sock_set_v6only(sock);
|
|
if (x11_use_localhost)
|
|
channel_set_reuseaddr(sock);
|
|
if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
|
|
debug2("bind port %d: %.100s", port, strerror(errno));
|
|
close(sock);
|
|
-
|
|
+ continue;
|
|
+ /* do not remove successfully opened sockets
|
|
for (n = 0; n < num_socks; n++) {
|
|
close(socks[n]);
|
|
}
|
|
num_socks = 0;
|
|
break;
|
|
+ */
|
|
}
|
|
socks[num_socks++] = sock;
|
|
if (num_socks == NUM_SOCKS)
|
|
break;
|
|
}
|
|
freeaddrinfo(aitop);
|
|
if (num_socks > 0)
|
|
break;
|