Age | Commit message (Collapse) | Author |
|
|
|
Occurs when compiling xserver master with gcc 13.2.1.
In file included from /local/stuff/xorg/include/X11/Xtrans/transport.c:69:
In function ‘_XSERVTransGetHostname’,
inlined from ‘_XSERVTransConvertAddress’ at /local/stuff/xorg/include/X11/Xtrans/Xtransutil.c:188:12:
/local/stuff/xorg/include/X11/Xtrans/Xtrans.c:1352:5: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
1352 | strncpy (buf, name.nodename, len);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/local/stuff/xorg/include/X11/Xtrans/Xtrans.c:1350:11: note: length computed here
1350 | len = strlen (name.nodename);
| ^~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Kim Woelders <kim@woelders.dk>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/16>
|
|
Occurs when compiling xserver master with gcc 13.2.1.
In file included from /local/stuff/xorg/include/X11/Xtrans/transport.c:69,
from ../os/xstrans.c:17:
/local/stuff/xorg/include/X11/Xtrans/Xtrans.c: In function ‘_XSERVTransParseAddress’:
/local/stuff/xorg/include/X11/Xtrans/Xtrans.c:216:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
216 | _host = "";
| ^
/local/stuff/xorg/include/X11/Xtrans/Xtrans.c:217:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
217 | _port = address;
| ^
/local/stuff/xorg/include/X11/Xtrans/Xtrans.c:229:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
229 | _host = "";
| ^
/local/stuff/xorg/include/X11/Xtrans/Xtrans.c:230:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
230 | _port = address + 5;
| ^
Signed-off-by: Kim Woelders <kim@woelders.dk>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/16>
|
|
|
|
Do not consider anything else in this case.
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
|
|
This adds explicit checks for addresses that start with / or unix: and
uses full paths in this case.
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
|
|
Xwayland can optionally be socket-activated by the Wayland compositor,
in which case it would use only the sockets provided by the compositor.
However, that prevents other transport protocols from working, because
when it's given a socket from the Wayland compositor, it would disable
all other connections and rely solely on the given socket.
Change `MakeAllCOTSServerListeners` to allow for partial connections so
that if `partial` is set to a non-zero value by the caller, we do not
bail out in the address is already in use.
That allows to continue trying with other protocols even if the local
connection fails (as this is already handled by the socket from the
Wayland compositor).
Related: https://gitlab.freedesktop.org/xorg/xserver/issues/817
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
|
|
|
|
Found by using:
codespell --builtin clear,rare,usage,informal,code,names
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
This didn't even correspond to any of the testing protocol extensions!
Apparently there used to be some test programs in xtrans itself, and
they've not been a thing since 1994:
https://cgit.freedesktop.org/~alanc/xc-historical/commit/?id=73bf4832c427855b2ce111d47dd1f181564b8d06
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
Again, pre-xcb libX11 was the only consumer.
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>
|
|
|
|
This will allow a server to disable listeners by default and then
let later configuration re-enable them. In particular, this lets the X
server disable inet and unix listen sockets by default while still
providing a '-listen' command line option to re-enable them later on.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
|
|
Required also changing receive_listening_fds to specify port as const,
which we can do now that TRANS(ReopenCOTSServer) takes it as const.
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>
|
|
Required also adding const to static TRANS(ParseAddress) function which
they pass the address arg to for parsing.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
|
|
Fixes warnings on at least NetBSD.
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
|
|
|
|
libxtrans provides TransNoListen() to set the 'don't listen' flag for a
particular transport, but there is no interface to query the state of that flag
This is a bit of a problem for the XWin server, as it wants to start some helper
clients (for clipboard integration and integrated window management), so needs
to know what transports the server is listening on to construct appropriate
display names for those clients.
Add TransIsListening() to discover if TransNoListen() has been called for a
particular protocol or not
HdG:
-Invert the final check so that TransIsListening returns True when
TRANS_NOLISTEN is not set, as one would expect of it.
-Make the protocol argument a const char * as similar functions do
-Fix "warning: too many arguments for format" warning
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Receive file descriptors of open sockets from systemd instead of
creating them.
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Piort Bereza <p.bereza@samsung.com>
Cc: Karol Lewandowski <k.lewandowsk@samsung.com>
Cc: Lennart Poettering <lennart@poettering.net>
Cc: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Cc: Peter Hutterer <peter.hutterer@who-t.net>
Cc: walter harms <wharms@bfs.de>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The flag is to be used to mark transports related to sockets
received from systemd.
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
Stick all of the functions relating to FD passing inside
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
This reverts commit 9e8d99c2e27f2c8acbbfb5b760649aa1bfad665e.
libFS still uses this API...
|
|
|
|
Exposes new TRANS(SendFd)/TRANS(RecvFd) APIs.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
No-one uses this, so there's no reason for it to be in the library
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
Has never been converted to build in modular builds, so has been unusable
since X11R7.0 release in 2005. All known platforms with TLI/XTI support
that X11R7 & later releases run on also have (and mostly prefer) BSD
socket support for their networking API.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Conflicts:
Xtrans.c
Xtransutil.c
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
|
|
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
|