[PATCH] XDMCP options like -query etc. should imply -listen tcp
Alan Coopersmith
alan.coopersmith at oracle.com
Fri Feb 13 23:29:11 PST 2015
On 02/12/15 04:34 AM, Jon TURNEY wrote:
> 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 at dronecode.org.uk>
> ---
> 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) {
>
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Engineering - http://blogs.oracle.com/alanc
More information about the xorg-devel
mailing list