Compare commits
No commits in common. "c8" and "imports/c8-beta/xorg-x11-xtrans-devel-1.3.5-6.el8" have entirely different histories.
c8
...
imports/c8
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/xtrans-1.4.0.tar.bz2
|
SOURCES/xtrans-1.3.5.tar.bz2
|
||||||
|
@ -1 +1 @@
|
|||||||
7c490026efb450798e02b040c05eba5212291c08 SOURCES/xtrans-1.4.0.tar.bz2
|
2d3ae1839d841f568bc481c6116af7d2a9f9ba59 SOURCES/xtrans-1.3.5.tar.bz2
|
||||||
|
@ -1,113 +0,0 @@
|
|||||||
From 8302f576f8b41f9aa95b091a9ef001ab5ddc2ef5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ray Strode <rstrode@redhat.com>
|
|
||||||
Date: Fri, 6 May 2022 14:23:59 -0400
|
|
||||||
Subject: [PATCH] Automatically disable inet6 transport if ipv6 is disabled on
|
|
||||||
machine
|
|
||||||
|
|
||||||
If a machine is booted with ipv6.disable=1, trying to bind to an
|
|
||||||
AF_INET6 socket will fail with AFNOSUPPORT.
|
|
||||||
|
|
||||||
The tcp transport automatically falls back to ipv4 in this case, but
|
|
||||||
the more specific inet6 transport just fails.
|
|
||||||
|
|
||||||
This failure leads to MakeAllCOTSServerListeners returning a partial
|
|
||||||
success.
|
|
||||||
|
|
||||||
Unfortunately, the X server can't really contiue with partial successes
|
|
||||||
from this function if -displayfd is in use, since that would, in other
|
|
||||||
cases, potentially lead to the -displayfd electing a display number that
|
|
||||||
is potentially partially in use by a rogue program.
|
|
||||||
|
|
||||||
This commit addresses the issue by automatically disabling transports
|
|
||||||
when they fail with AFNOSUPPORT, leading them to get ignored, rather than
|
|
||||||
proceeding and ultimately returning from MakeAllCOTSServerListerns with
|
|
||||||
partial=TRUE.
|
|
||||||
---
|
|
||||||
Xtranssock.c | 15 +++++++++++----
|
|
||||||
1 file changed, 11 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Xtranssock.c b/Xtranssock.c
|
|
||||||
index 632c1b5..2c80a5c 100644
|
|
||||||
--- a/Xtranssock.c
|
|
||||||
+++ b/Xtranssock.c
|
|
||||||
@@ -584,66 +584,73 @@ TRANS(SocketOpenCOTSClient) (Xtransport *thistrans, const char *protocol,
|
|
||||||
const char *host, const char *port)
|
|
||||||
{
|
|
||||||
return TRANS(SocketOpenCOTSClientBase)(
|
|
||||||
thistrans->TransName, protocol, host, port, -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* TRANS_CLIENT */
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef TRANS_SERVER
|
|
||||||
|
|
||||||
static XtransConnInfo
|
|
||||||
TRANS(SocketOpenCOTSServer) (Xtransport *thistrans, const char *protocol,
|
|
||||||
const char *host, const char *port)
|
|
||||||
|
|
||||||
{
|
|
||||||
XtransConnInfo ciptr;
|
|
||||||
int i = -1;
|
|
||||||
|
|
||||||
prmsg (2,"SocketOpenCOTSServer(%s,%s,%s)\n", protocol, host, port);
|
|
||||||
|
|
||||||
SocketInitOnce();
|
|
||||||
|
|
||||||
while ((i = TRANS(SocketSelectFamily) (i, thistrans->TransName)) >= 0) {
|
|
||||||
if ((ciptr = TRANS(SocketOpen) (
|
|
||||||
i, Sockettrans2devtab[i].devcotsname)) != NULL)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (i < 0) {
|
|
||||||
- if (i == -1)
|
|
||||||
- prmsg (1,"SocketOpenCOTSServer: Unable to open socket for %s\n",
|
|
||||||
- thistrans->TransName);
|
|
||||||
- else
|
|
||||||
+ if (i == -1) {
|
|
||||||
+ if (errno == EAFNOSUPPORT) {
|
|
||||||
+ thistrans->flags |= TRANS_NOLISTEN;
|
|
||||||
+ prmsg (1,"SocketOpenCOTSServer: Socket for %s unsupported on this system.\n",
|
|
||||||
+ thistrans->TransName);
|
|
||||||
+ } else {
|
|
||||||
+ prmsg (1,"SocketOpenCOTSServer: Unable to open socket for %s\n",
|
|
||||||
+ thistrans->TransName);
|
|
||||||
+ }
|
|
||||||
+ } else {
|
|
||||||
prmsg (1,"SocketOpenCOTSServer: Unable to determine socket type for %s\n",
|
|
||||||
thistrans->TransName);
|
|
||||||
+ }
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Using this prevents the bind() check for an existing server listening
|
|
||||||
* on the same port, but it is required for other reasons.
|
|
||||||
*/
|
|
||||||
#ifdef SO_REUSEADDR
|
|
||||||
|
|
||||||
/*
|
|
||||||
* SO_REUSEADDR only applied to AF_INET && AF_INET6
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (Sockettrans2devtab[i].family == AF_INET
|
|
||||||
#if defined(IPv6) && defined(AF_INET6)
|
|
||||||
|| Sockettrans2devtab[i].family == AF_INET6
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int one = 1;
|
|
||||||
setsockopt (ciptr->fd, SOL_SOCKET, SO_REUSEADDR,
|
|
||||||
(char *) &one, sizeof (int));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#ifdef IPV6_V6ONLY
|
|
||||||
if (Sockettrans2devtab[i].family == AF_INET6)
|
|
||||||
{
|
|
||||||
int one = 1;
|
|
||||||
setsockopt(ciptr->fd, IPPROTO_IPV6, IPV6_V6ONLY, &one, sizeof(int));
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.35.1
|
|
||||||
|
|
@ -7,21 +7,18 @@
|
|||||||
|
|
||||||
Summary: X.Org X11 developmental X transport library
|
Summary: X.Org X11 developmental X transport library
|
||||||
Name: xorg-x11-xtrans-devel
|
Name: xorg-x11-xtrans-devel
|
||||||
Version: 1.4.0
|
Version: 1.3.5
|
||||||
Release: 4%{?dist}
|
Release: 6%{?dist}
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: http://www.x.org
|
URL: http://www.x.org
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
Source0: https://xorg.freedesktop.org/archive/individual/lib/xtrans-%{version}.tar.bz2
|
Source0: http://xorg.freedesktop.org/archive/individual/lib/xtrans-%{version}.tar.bz2
|
||||||
|
|
||||||
# Fedora specific patch
|
# Fedora specific patch
|
||||||
Patch1: xtrans-1.0.3-avoid-gethostname.patch
|
Patch1: xtrans-1.0.3-avoid-gethostname.patch
|
||||||
|
|
||||||
Patch2: 0001-Automatically-disable-inet6-transport-if-ipv6-is-dis.patch
|
|
||||||
|
|
||||||
BuildRequires: git
|
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: xorg-x11-util-macros
|
BuildRequires: xorg-x11-util-macros
|
||||||
|
|
||||||
@ -29,7 +26,8 @@ BuildRequires: xorg-x11-util-macros
|
|||||||
X.Org X11 developmental X transport library
|
X.Org X11 developmental X transport library
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -S git -n xtrans-%{version}
|
%setup -q -n xtrans-%{version}
|
||||||
|
%patch1 -p1 -b .my-name-is-unix
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# yes, this looks horrible, but it's to get the .pc file in datadir
|
# yes, this looks horrible, but it's to get the .pc file in datadir
|
||||||
@ -38,7 +36,7 @@ X.Org X11 developmental X transport library
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
|
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
|
||||||
install -pm 644 AUTHORS ChangeLog COPYING README.md $RPM_BUILD_ROOT%{_pkgdocdir}
|
install -pm 644 AUTHORS ChangeLog COPYING README $RPM_BUILD_ROOT%{_pkgdocdir}
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%{_pkgdocdir}
|
%{_pkgdocdir}
|
||||||
@ -55,17 +53,6 @@ install -pm 644 AUTHORS ChangeLog COPYING README.md $RPM_BUILD_ROOT%{_pkgdocdir}
|
|||||||
%{_datadir}/pkgconfig/xtrans.pc
|
%{_datadir}/pkgconfig/xtrans.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Jun 09 2022 Ray Strode <rstrode@redhat.com> - 1.4.0-4
|
|
||||||
- Actually apply the ipv6.disable support
|
|
||||||
Related: #2075132
|
|
||||||
|
|
||||||
* Fri May 06 2022 Ray Strode <rstrode@redhat.com> - 1.4.0-2
|
|
||||||
- Support ipv6.disable=1
|
|
||||||
Related: #2075132
|
|
||||||
|
|
||||||
* Tue Jun 02 2020 Adam Jackson <ajax@redhat.com> - 1.4.0-1
|
|
||||||
- xtrans 1.4.0
|
|
||||||
|
|
||||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.5-6
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.5-6
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user