From 475d6c1f26fa44a4b4e2ee25b40656e4a8f3eac6 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Tue, 26 Feb 2019 20:57:21 +0100 Subject: libNX_X11: reintroduce HASXDMAUTH Fixes ArcticaProject/nx-libs#779 --- nx-X11/lib/configure.ac | 24 ++++++++++++++++++++++++ nx-X11/lib/src/Makefile.am | 2 ++ 2 files changed, 26 insertions(+) diff --git a/nx-X11/lib/configure.ac b/nx-X11/lib/configure.ac index 025d27111..205a4f1f9 100644 --- a/nx-X11/lib/configure.ac +++ b/nx-X11/lib/configure.ac @@ -42,6 +42,19 @@ PKG_PROG_PKG_CONFIG X11_REQUIRES='nx-xproto nx-xextproto nx-xtrans' X11_EXTRA_DEPS="" +X11_REQUIRES="${X11_REQUIRES} xau xcmiscproto bigreqsproto" +X11_EXTRA_DEPS="xau" +PKG_CHECK_MODULES(XDMCP, xdmcp, + AC_CHECK_LIB(Xdmcp, XdmcpWrap, + [ + AC_CHECK_LIB(Xdmcp, XdmcpWrap, [xdmauth="yes"], [xdmauth="no"], [$XDMCP_LIBS]) + X11_EXTRA_DEPS="$X11_EXTRA_DEPS xdmcp" + ], + [ + XDMCP_CFLAGS= + XDMCP_LIBS= + ], [$XDMCP_LIBS]), + [AC_MSG_RESULT(no)]) AC_SUBST(X11_EXTRA_DEPS) # Silence warning: ar: 'u' modifier ignored since 'D' is the default @@ -156,6 +169,17 @@ fi AC_SUBST(XTHREADLIB) AC_SUBST(XTHREAD_CFLAGS) +case x$xdmauth in +xyes) + XDMCP_CFLAGS="$XDMCP_CFLAGS -DHASXDMAUTH" + ;; +xno) + XDMCP_LIBS="" + ;; +esac +AC_SUBST(XDMCP_CFLAGS) +AC_SUBST(XDMCP_LIBS) + AC_CHECK_FUNC(poll, [has_poll="yes"], [has_poll="no"]) AC_ARG_ENABLE([poll], diff --git a/nx-X11/lib/src/Makefile.am b/nx-X11/lib/src/Makefile.am index 90011f602..016dbc5cf 100644 --- a/nx-X11/lib/src/Makefile.am +++ b/nx-X11/lib/src/Makefile.am @@ -28,6 +28,7 @@ AM_CPPFLAGS= \ AM_CFLAGS= \ $(X11_CFLAGS) \ $(BIGFONT_CFLAGS) \ + $(XDMCP_CFLAGS) \ $(XMALLOC_ZERO_CFLAGS) \ $(CWARNFLAGS) \ $(NULL) @@ -364,6 +365,7 @@ libNX_X11_la_LIBADD = \ $(USE_XCMS_LIBS) \ $(USE_XKB_LIBS) \ $(X11_LIBS) \ + $(XDMCP_LIBS) \ -L$(top_srcdir)/../../nxcomp/src/.libs -lXcomp \ $(NULL) -- cgit v1.2.3 From 3335f250350b892e231dfb3fbd1527a8db2898f3 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Tue, 26 Feb 2019 22:35:58 +0100 Subject: libNX_X11: reintroduce SECURE_RPC Fixes ArcticaProject/nx-libs#780 --- nx-X11/lib/configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nx-X11/lib/configure.ac b/nx-X11/lib/configure.ac index 205a4f1f9..81647aee7 100644 --- a/nx-X11/lib/configure.ac +++ b/nx-X11/lib/configure.ac @@ -67,6 +67,9 @@ m4_pattern_forbid([^NX_XTRANS_CONNECTION_FLAGS$]) # Transport selection macro from nx-xtrans.m4 NX_XTRANS_CONNECTION_FLAGS +# Secure RPC detection macro from xtrans.m4 +NX_XTRANS_SECURE_RPC_FLAGS + # Check for dlopen AC_MSG_CHECKING([if run-time linking is supported]) AC_SEARCH_LIBS(dlopen,[dl svld]) -- cgit v1.2.3 From b4124219afdf4c5bb5dc2e9584bbec8ab5c19758 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Tue, 26 Feb 2019 23:20:46 +0100 Subject: nx-xtrans.m4: reintroduce HAS_STICKY_DIR_BIT Fixes ArcticaProject/nx-libs#781 --- m4/nx-xtrans.m4 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/m4/nx-xtrans.m4 b/m4/nx-xtrans.m4 index 1ac7b0e75..fb0b1f70e 100644 --- a/m4/nx-xtrans.m4 +++ b/m4/nx-xtrans.m4 @@ -166,3 +166,14 @@ AC_DEFUN([NX_XTRANS_SECURE_RPC_FLAGS], fi AC_MSG_RESULT($SECURE_RPC) ]) # NX_XTRANS_SECURE_RPC_FLAGS + +# the following originates from libxtrans/configure.ac + +# sticky bit +# +# if any system exists without sticky dir bits this +# needs to be redone with a real autoconf test + +sticky_bit_define="-DHAS_STICKY_DIR_BIT" + +AC_SUBST(sticky_bit_define) -- cgit v1.2.3 From 94fcba361060b2e8da9eba395ffc5d4b7978ea47 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 28 Feb 2019 23:57:36 +0100 Subject: libNX_X11: set FAIL_HARD as it has been in the imake builds Fixes ArcticaProject/nx-libs#783 --- nx-X11/lib/configure.ac | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/nx-X11/lib/configure.ac b/nx-X11/lib/configure.ac index 81647aee7..09204bba6 100644 --- a/nx-X11/lib/configure.ac +++ b/nx-X11/lib/configure.ac @@ -67,9 +67,22 @@ m4_pattern_forbid([^NX_XTRANS_CONNECTION_FLAGS$]) # Transport selection macro from nx-xtrans.m4 NX_XTRANS_CONNECTION_FLAGS + # Secure RPC detection macro from xtrans.m4 NX_XTRANS_SECURE_RPC_FLAGS +# Original comments regarding FAIL_HARD from libxtrans: +# "fail hard if socket directories cannot be chowned to root or +# chmod'ed to the requested mode if 'sticky' bit is requested for this +# directory instead of just print a warning that will remain unnoticed +# most of the times. +# Set the define XtransFailSoft to restore the old +# behavior to fail softly when socket directory cannot chowned/chmod +# to correct user/group." +# +# -> we want to always fail in that scenario. +AC_DEFINE(FAIL_HARD,1,[Fail if the xtrans socket directory has wrong permissions]) + # Check for dlopen AC_MSG_CHECKING([if run-time linking is supported]) AC_SEARCH_LIBS(dlopen,[dl svld]) -- cgit v1.2.3 From 1215c36f77032ad4f08e1150d98101478a57cbf7 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 1 Mar 2019 00:08:43 +0100 Subject: libNX_X11: set XTRANS_SEND_FDS=0 NX does not support passing around FDs for local connections. This will not cause any change in the resulting code as this variable had been unset by default. Fixes ArcticaProject/nx-libs#784 --- nx-X11/lib/configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nx-X11/lib/configure.ac b/nx-X11/lib/configure.ac index 09204bba6..c616dab57 100644 --- a/nx-X11/lib/configure.ac +++ b/nx-X11/lib/configure.ac @@ -81,7 +81,10 @@ NX_XTRANS_SECURE_RPC_FLAGS # to correct user/group." # # -> we want to always fail in that scenario. -AC_DEFINE(FAIL_HARD,1,[Fail if the xtrans socket directory has wrong permissions]) +AC_DEFINE(FAIL_HARD,1,[Fail if the xtrans socket directory cannot be chowned/chmod'ed]) + +# Actually disable all of the FD passing code, NX does not support it. +AC_DEFINE(XTRANS_SEND_FDS,0,[Disable xtrans FD passing code.]) # Check for dlopen AC_MSG_CHECKING([if run-time linking is supported]) -- cgit v1.2.3