Age | Commit message (Collapse) | Author |
|
|
|
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/19>
|
|
|
|
CVE-2020-25697 and the Flatpak documentation show that clients using
abstract sockets without mutual authentication is unsafe.
TRANS_ABSTRACT remains supported, but it is now a no-op on the client
side. Abstract sockets are still supported for servers, as the X server
authenticates the client via other methods.
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
|
|
Oracle no longer includes this term in our copyright & license notices.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Don't define this function unless it is actually going to be used.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
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.
|
|
|
|
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=99882
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
xorg-server moved from HAS_STRLCPY to HAVE_STRLCPY in 2011
cf-xserver: d829a7c5cb42c979b58f3547136df5b05d906423
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
|
|
LBX is dead, and TEST_t is unused.
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Never been used, as far as I can tell.
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
|
|
No other x86 SysV platforms have ever been supported in the modular
build systems, so we don't need to keep carrying around a bunch of
ifdef's for them.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
|
|
Globally replace #ifdef and #if defined usage of 'sun' with '__sun' such
that strict ISO compiler modes such as -ansi or -std=c99 can be used.
Signed-off-by: Richard PALO <richard@NetBSD.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Also required constifying UnixHostReallyLocal, since SocketUNIXConnect
passes the host arg through to it.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
Some systems provide a really small default buffer size for UNIX sockets.
Bump it up to 64k if necessary such that large transfers (such as
XGetImage() on a 8-megapixel image) don't take tens of seconds.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
A char array on the stack is not guaranteed to have more than byte
alignment. This means that casting it to a 'struct cmsghdr' and
accessing its members may result in unaligned access. This will
generate SIGBUS on strict alignment architectures like OpenBSD/sparc64.
The solution is to use a union to force proper alignment.
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
|
|
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
|
|
|
|
This should be portable to non-Linux systems
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Stick all of the functions relating to FD passing inside
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Now that we've found that libFS uses readv, we can test whether this
readv implementation works correctly.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
Exposes new TRANS(SendFd)/TRANS(RecvFd) APIs.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Conflicts:
Xtrans.c
Xtransutil.c
|
|
This function was constructing an address from a port string allocating
a buffer according to the size of the string but then later copying
the address according to sizeof(struct sockaddr).
This patch ensures that we allocate a struct sockaddr buffer with enough
space for the port string to be copied into sa_data[] and uses that
combined length to determine how much should be copied at the end of the
function.
This fixes a crash when using xwayland which uses ListenOnOpenFD() that
will call _XSERVTransReopenCOTSServer() with a short port string like
":1".
Signed-off-by: Robert Bragg <robert@linux.intel.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
|
|
Commit 4ac40cd5451 started this, by no longer special casing the
xserver to include it's former custom allocation functions, this
just takes the remaining #defines and pre-substitutes them into
the code.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Hourihane <alanh@vmware.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Conflicts:
Xtranssock.c
Xtransutil.c
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Not all the transport variants use all the arguments to every function,
but as long as one transport type needs it, they all get the args passed.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|