Fix gnome-session listening on a tcp port problem

https://bugzilla.gnome.org/show_bug.cgi?id=794757
This commit is contained in:
Bruce Leidl 2018-03-29 09:17:43 -04:00
parent 3ccf54261c
commit 766a427a6d
2 changed files with 91 additions and 0 deletions

View File

@ -0,0 +1,88 @@
From 1ece66e683258a0bfa044d074becfe207d04a748 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 21 Mar 2018 15:19:44 -0400
Subject: xsmp: don't check for HAVE_XTRANS
It's not set anymore since the meson switch.
Instead require the xtrans.pc file to be around.
https://bugzilla.gnome.org/show_bug.cgi?id=794575
---
gnome-session/gsm-xsmp-server.c | 6 ------
meson.build | 2 ++
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/gnome-session/gsm-xsmp-server.c b/gnome-session/gsm-xsmp-server.c
index 1460a28..d558f9b 100644
--- a/gnome-session/gsm-xsmp-server.c
+++ b/gnome-session/gsm-xsmp-server.c
@@ -39,14 +39,12 @@
#include <X11/ICE/ICEconn.h>
#include <X11/SM/SMlib.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_XTRANS */
#include "gsm-xsmp-server.h"
#include "gsm-xsmp-client.h"
@@ -582,7 +580,6 @@ setup_listener (GsmXsmpServer *server)
gsm_util_init_error (TRUE, "Could not initialize libSM: %s", error);
}
-#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
@@ -592,7 +589,6 @@ setup_listener (GsmXsmpServer *server)
* guess.
*/
_IceTransNoListen ("tcp");
-#endif
/* Create the XSMP socket. Older versions of IceListenForConnections
* have a bug which causes the umask to be set to 0 on certain types
@@ -634,7 +630,6 @@ setup_listener (GsmXsmpServer *server)
gsm_util_init_error (TRUE, "IceListenForConnections did not return a local listener!");
}
-#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
@@ -653,7 +648,6 @@ setup_listener (GsmXsmpServer *server)
network_id_list);
free (network_id_list);
}
-#endif
/* Update .ICEauthority with new auth entries for our socket */
if (!update_iceauthority (server, TRUE)) {
diff --git a/meson.build b/meson.build
index 9eb36a4..6f6d051 100644
--- a/meson.build
+++ b/meson.build
@@ -95,6 +95,7 @@ glib_req_version = '>= 2.46.0'
gio_dep = dependency('gio-2.0', version: glib_req_version)
glib_dep = dependency('glib-2.0', version: glib_req_version)
gtk_dep = dependency('gtk+-3.0', version: '>= 3.18.0')
+xtrans_dep = dependency('xtrans')
ice_dep = dependency('ice')
sm_dep = dependency('sm')
x11_dep = dependency('x11')
@@ -107,6 +108,7 @@ session_deps = [
]
session_bin_deps = session_deps + [
+ xtrans_dep,
ice_dep,
sm_dep
]
--
cgit v0.12

View File

@ -2,6 +2,9 @@ require gnome-session.inc
SRC_URI[archive.md5sum] = "ceed281645d1f98768de957dc8e79ee6"
SRC_URI[archive.sha256sum] = "2e935ae2cacca2e1a7bff22bbe799797c74f79a33261093ceb3fd514b39bd14d"
# https://bugzilla.gnome.org/show_bug.cgi?id=794757
SRC_URI += "file://dont-check-for-have-xtrans.patch"
EXTRA_OEMESON = "-Denable-docbook=false -Denable-man=false"
inherit meson