1
0
xorg-x11-server/U_os-XDMCP-options-like-query-etc-should-imply-listen.patch
Stefan Dirsch 61a3a404ee Accepting request 293696 from home:michalsrb:branches:X11:XOrg
- U_os-XDMCP-options-like-query-etc-should-imply-listen.patch
  * Enable listening on tcp when using -query. (bnc#924914)

OBS-URL: https://build.opensuse.org/request/show/293696
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=565
2015-03-30 14:16:40 +00:00

83 lines
2.3 KiB
Diff

Git-commit: 491cf02e191e70c5ce24c19da880bb79bebfc03c
Author: Jon TURNEY <jon.turney@dronecode.org.uk>
Subject: os: XDMCP options like -query etc. should imply -listen tcp
Patch-Mainline: Upstream
Signed-off-by: Michal Srb <msrb@suse.com>
In X server 1.17, the default configuration is now -nolisten tcp. In this
configuration, XDMCP options don't work usefully, as the X server is not
listening on the port for the display that it tells the display manager to
connect to.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
---
os/xdmcp.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/os/xdmcp.c b/os/xdmcp.c
index b6e97c9..bc5a707 100644
--- a/os/xdmcp.c
+++ b/os/xdmcp.c
@@ -48,6 +48,11 @@
#include <netdir.h>
#endif
+#define XSERV_t
+#define TRANS_SERVER
+#define TRANS_REOPEN
+#include <X11/Xtrans/Xtrans.h>
+
#ifdef XDMCP
#undef REQUEST
@@ -242,6 +247,14 @@ XdmcpUseMsg(void)
ErrorF("-displayID display-id manufacturer display ID for request\n");
}
+static void
+XdmcpDefaultListen(void)
+{
+ /* Even when configured --disable-listen-tcp, we should listen on tcp in
+ XDMCP modes */
+ _XSERVTransListen("tcp");
+}
+
int
XdmcpOptions(int argc, char **argv, int i)
{
@@ -249,11 +262,13 @@ XdmcpOptions(int argc, char **argv, int i)
get_manager_by_name(argc, argv, i++);
XDM_INIT_STATE = XDM_QUERY;
AccessUsingXdmcp();
+ XdmcpDefaultListen();
return i + 1;
}
if (strcmp(argv[i], "-broadcast") == 0) {
XDM_INIT_STATE = XDM_BROADCAST;
AccessUsingXdmcp();
+ XdmcpDefaultListen();
return i + 1;
}
#if defined(IPv6) && defined(AF_INET6)
@@ -261,6 +276,7 @@ XdmcpOptions(int argc, char **argv, int i)
i = get_mcast_options(argc, argv, ++i);
XDM_INIT_STATE = XDM_MULTICAST;
AccessUsingXdmcp();
+ XdmcpDefaultListen();
return i + 1;
}
#endif
@@ -268,6 +284,7 @@ XdmcpOptions(int argc, char **argv, int i)
get_manager_by_name(argc, argv, i++);
XDM_INIT_STATE = XDM_INDIRECT;
AccessUsingXdmcp();
+ XdmcpDefaultListen();
return i + 1;
}
if (strcmp(argv[i], "-port") == 0) {
--
2.3.3