summaryrefslogtreecommitdiff
path: root/mate-session/gsm-xsmp-server.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-01-18 15:55:22 +0300
committermonsta <[email protected]>2017-01-18 15:55:22 +0300
commit3e8cab348e37b9879fa558e56e05069987c6c65a (patch)
treec9aa747d3385f2cb069a84c99a9ed357ebcb25ca /mate-session/gsm-xsmp-server.c
parent343219fd031b285483d7cbf98d22ac52095caa21 (diff)
downloadmate-session-manager-3e8cab348e37b9879fa558e56e05069987c6c65a.tar.bz2
mate-session-manager-3e8cab348e37b9879fa558e56e05069987c6c65a.tar.xz
build: check stricter for presence of xtrans
this should ensure that mate-session won't listen to TCP ports. if needed, this check can be disabled using --without-xtrans option. fixes https://github.com/mate-desktop/mate-session-manager/issues/131 adapted from: https://git.gnome.org/browse/gnome-session/commit/?id=aa4c9d125012ae94154ce075d62342b63b41a7d9
Diffstat (limited to 'mate-session/gsm-xsmp-server.c')
-rw-r--r--mate-session/gsm-xsmp-server.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mate-session/gsm-xsmp-server.c b/mate-session/gsm-xsmp-server.c
index b1d96be..83ec21f 100644
--- a/mate-session/gsm-xsmp-server.c
+++ b/mate-session/gsm-xsmp-server.c
@@ -39,14 +39,14 @@
#include <X11/ICE/ICEconn.h>
#include <X11/SM/SMlib.h>
-#ifdef HAVE_X11_XTRANS_XTRANS_H
+#if HAVE_XTRANS
/* Get the proto for _IceTransNoListen */
#define ICE_t
#define TRANS_SERVER
#include <X11/Xtrans/Xtrans.h>
#undef ICE_t
#undef TRANS_SERVER
-#endif /* HAVE_X11_XTRANS_XTRANS_H */
+#endif /* HAVE_XTRANS */
#include "gsm-xsmp-server.h"
#include "gsm-xsmp-client.h"
@@ -560,7 +560,7 @@ setup_listener (GsmXsmpServer *server)
gsm_util_init_error (TRUE, "Could not initialize libSM: %s", error);
}
-#ifdef HAVE_X11_XTRANS_XTRANS_H
+#if HAVE_XTRANS
/* By default, IceListenForConnections will open one socket for each
* transport type known to X. We don't want connections from remote
* hosts, so for security reasons it would be best if ICE didn't
@@ -612,7 +612,7 @@ setup_listener (GsmXsmpServer *server)
gsm_util_init_error (TRUE, "IceListenForConnections did not return a local listener!");
}
-#ifdef HAVE_X11_XTRANS_XTRANS_H
+#ifdef HAVE_XTRANS
if (server->priv->num_local_xsmp_sockets != server->priv->num_xsmp_sockets) {
/* Xtrans was apparently compiled with support for some
* non-local transport besides TCP (which we disabled above); we