Backport connection throttling
CVE: CVE-2026-18358 Resolves: RHEL-222511
This commit is contained in:
parent
851540b7fc
commit
2c6912270e
@ -1,4 +1,4 @@
|
||||
From 05c1ede310a22ff8d9044b1e87d8a562526635d3 Mon Sep 17 00:00:00 2001
|
||||
From 0e02ebf4f4f0bb6fd004d86a8baf1106d48c0ed4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Joan=20Torres=20L=C3=B3pez?= <joantolo@redhat.com>
|
||||
Date: Wed, 4 Jun 2025 11:32:25 +0200
|
||||
Subject: [PATCH 01/12] daemon-system: Use timeout_add_seconds_once on
|
||||
@ -9,19 +9,19 @@ Subject: [PATCH 01/12] daemon-system: Use timeout_add_seconds_once on
|
||||
1 file changed, 8 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/grd-daemon-system.c b/src/grd-daemon-system.c
|
||||
index 8229978..41715f0 100644
|
||||
index 97c37b20..7c5b77a6 100644
|
||||
--- a/src/grd-daemon-system.c
|
||||
+++ b/src/grd-daemon-system.c
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "grd-session-rdp.h"
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "grd-settings.h"
|
||||
#include "grd-utils.h"
|
||||
|
||||
-#define MAX_HANDOVER_WAIT_TIME_MS (30 * 1000)
|
||||
+#define MAX_HANDOVER_WAIT_TIME_S 30
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -182,7 +182,7 @@ on_handle_take_client (GrdDBusRemoteDesktopRdpHandover *interface,
|
||||
@@ -183,7 +183,7 @@ on_handle_take_client (GrdDBusRemoteDesktopRdpHandover *interface,
|
||||
return G_DBUS_METHOD_INVOCATION_HANDLED;
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ index 8229978..41715f0 100644
|
||||
abort_handover (gpointer user_data)
|
||||
{
|
||||
GrdRemoteClient *remote_client = user_data;
|
||||
@@ -198,8 +198,6 @@ abort_handover (gpointer user_data)
|
||||
@@ -199,8 +199,6 @@ abort_handover (gpointer user_data)
|
||||
}
|
||||
|
||||
g_hash_table_remove (daemon_system->remote_clients, remote_client->id);
|
||||
@ -39,7 +39,7 @@ index 8229978..41715f0 100644
|
||||
}
|
||||
|
||||
static char *
|
||||
@@ -412,7 +410,9 @@ on_handle_start_handover (GrdDBusRemoteDesktopRdpHandover *interface,
|
||||
@@ -413,7 +411,9 @@ on_handle_start_handover (GrdDBusRemoteDesktopRdpHandover *interface,
|
||||
if (remote_client->abort_handover_source_id == 0)
|
||||
{
|
||||
remote_client->abort_handover_source_id =
|
||||
@ -50,7 +50,7 @@ index 8229978..41715f0 100644
|
||||
}
|
||||
|
||||
return G_DBUS_METHOD_INVOCATION_HANDLED;
|
||||
@@ -607,7 +607,9 @@ remote_client_new (GrdDaemonSystem *daemon_system,
|
||||
@@ -608,7 +608,9 @@ remote_client_new (GrdDaemonSystem *daemon_system,
|
||||
remote_client);
|
||||
|
||||
remote_client->abort_handover_source_id =
|
||||
@ -61,7 +61,11 @@ index 8229978..41715f0 100644
|
||||
|
||||
return remote_client;
|
||||
}
|
||||
From 66f462124e295db2d977f721f77cdab28c2b49cc Mon Sep 17 00:00:00 2001
|
||||
--
|
||||
2.54.0
|
||||
|
||||
|
||||
From 768e44296b975c05864ba2c90169f82b388d2474 Mon Sep 17 00:00:00 2001
|
||||
From: Joan Torres <joantolo@redhat.com>
|
||||
Date: Sat, 17 May 2025 02:13:35 +0200
|
||||
Subject: [PATCH 02/12] daemon-system: Move session_id_changed
|
||||
@ -73,10 +77,10 @@ next commit.
|
||||
1 file changed, 22 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/src/grd-daemon-system.c b/src/grd-daemon-system.c
|
||||
index 70142a0..3ad3612 100644
|
||||
index 7c5b77a6..8089882b 100644
|
||||
--- a/src/grd-daemon-system.c
|
||||
+++ b/src/grd-daemon-system.c
|
||||
@@ -923,28 +923,6 @@ on_remote_display_factory_proxy_acquired (GObject *object,
|
||||
@@ -920,28 +920,6 @@ on_remote_display_factory_proxy_acquired (GObject *object,
|
||||
grd_daemon_maybe_enable_services (GRD_DAEMON (daemon_system));
|
||||
}
|
||||
|
||||
@ -105,7 +109,7 @@ index 70142a0..3ad3612 100644
|
||||
static void
|
||||
on_remote_display_remote_id_changed (GrdDBusGdmRemoteDisplay *remote_display,
|
||||
GParamSpec *pspec,
|
||||
@@ -983,6 +961,28 @@ on_remote_display_remote_id_changed (GrdDBusGdmRemoteDisplay *remote_display,
|
||||
@@ -980,6 +958,28 @@ on_remote_display_remote_id_changed (GrdDBusGdmRemoteDisplay *remote_display,
|
||||
new_remote_client->handover_dst->interface);
|
||||
}
|
||||
|
||||
@ -135,10 +139,10 @@ index 70142a0..3ad3612 100644
|
||||
register_handover_for_display (GrdDaemonSystem *daemon_system,
|
||||
GrdDBusGdmRemoteDisplay *remote_display)
|
||||
--
|
||||
2.51.0
|
||||
2.54.0
|
||||
|
||||
|
||||
From 3d480acc40627fa61c8461a08b798adea5f37443 Mon Sep 17 00:00:00 2001
|
||||
From 2029d710b37e9c4d4907c6361d338eebee4e0bf1 Mon Sep 17 00:00:00 2001
|
||||
From: Joan Torres <joantolo@redhat.com>
|
||||
Date: Sat, 17 May 2025 02:18:09 +0200
|
||||
Subject: [PATCH 03/12] daemon-system: Don't register handover if session_id is
|
||||
@ -155,10 +159,10 @@ displays, but in the next commit that will change.
|
||||
1 file changed, 18 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/grd-daemon-system.c b/src/grd-daemon-system.c
|
||||
index 3ad3612..92b4d76 100644
|
||||
index 8089882b..968c7074 100644
|
||||
--- a/src/grd-daemon-system.c
|
||||
+++ b/src/grd-daemon-system.c
|
||||
@@ -970,17 +970,23 @@ on_gdm_remote_display_session_id_changed (GrdDBusGdmRemoteDisplay *remote_displa
|
||||
@@ -967,17 +967,23 @@ on_gdm_remote_display_session_id_changed (GrdDBusGdmRemoteDisplay *remote_displa
|
||||
|
||||
session_id = grd_dbus_gdm_remote_display_get_session_id (remote_display);
|
||||
|
||||
@ -187,7 +191,7 @@ index 3ad3612..92b4d76 100644
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1004,10 +1010,6 @@ register_handover_for_display (GrdDaemonSystem *daemon_system,
|
||||
@@ -1001,10 +1007,6 @@ register_handover_for_display (GrdDaemonSystem *daemon_system,
|
||||
disconnect_from_remote_display (remote_client);
|
||||
remote_client->remote_display = g_object_ref (remote_display);
|
||||
|
||||
@ -198,7 +202,7 @@ index 3ad3612..92b4d76 100644
|
||||
session_id = grd_dbus_gdm_remote_display_get_session_id (remote_display);
|
||||
if (!session_id || strcmp (session_id, "") == 0)
|
||||
{
|
||||
@@ -1022,6 +1024,10 @@ register_handover_for_display (GrdDaemonSystem *daemon_system,
|
||||
@@ -1019,6 +1021,10 @@ register_handover_for_display (GrdDaemonSystem *daemon_system,
|
||||
remote_client->id,
|
||||
session_id);
|
||||
|
||||
@ -209,7 +213,7 @@ index 3ad3612..92b4d76 100644
|
||||
register_handover_iface (remote_client, session_id);
|
||||
}
|
||||
|
||||
@@ -1045,6 +1051,9 @@ unregister_handover_for_display (GrdDaemonSystem *daemon_system,
|
||||
@@ -1042,6 +1048,9 @@ unregister_handover_for_display (GrdDaemonSystem *daemon_system,
|
||||
}
|
||||
|
||||
session_id = grd_dbus_gdm_remote_display_get_session_id (remote_display);
|
||||
@ -220,10 +224,10 @@ index 3ad3612..92b4d76 100644
|
||||
REMOTE_DESKTOP_HANDOVERS_OBJECT_PATH,
|
||||
session_id);
|
||||
--
|
||||
2.51.0
|
||||
2.54.0
|
||||
|
||||
|
||||
From 06b4f4a9b717145c9bd926e755b9700fe927b191 Mon Sep 17 00:00:00 2001
|
||||
From 4b6d86116e2d796346fd26870224aa069d75fa42 Mon Sep 17 00:00:00 2001
|
||||
From: Joan Torres <joantolo@redhat.com>
|
||||
Date: Sat, 17 May 2025 02:46:50 +0200
|
||||
Subject: [PATCH 04/12] daemon-system: Consider remote sessions from autologin
|
||||
@ -259,7 +263,7 @@ will be used on both of them:
|
||||
3 files changed, 75 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/data/org.gnome.RemoteDesktop.conf.in b/data/org.gnome.RemoteDesktop.conf.in
|
||||
index 891d219..ca87c90 100644
|
||||
index 891d2195..ca87c90f 100644
|
||||
--- a/data/org.gnome.RemoteDesktop.conf.in
|
||||
+++ b/data/org.gnome.RemoteDesktop.conf.in
|
||||
@@ -12,6 +12,8 @@
|
||||
@ -272,7 +276,7 @@ index 891d219..ca87c90 100644
|
||||
|
||||
<!-- Anyone can send messages to the interfaces of the service -->
|
||||
diff --git a/src/grd-daemon-system.c b/src/grd-daemon-system.c
|
||||
index 92b4d76..05b57f2 100644
|
||||
index 968c7074..cf59dcc3 100644
|
||||
--- a/src/grd-daemon-system.c
|
||||
+++ b/src/grd-daemon-system.c
|
||||
@@ -83,6 +83,11 @@ struct _GrdDaemonSystem
|
||||
@ -287,7 +291,7 @@ index 92b4d76..05b57f2 100644
|
||||
static void
|
||||
on_remote_display_remote_id_changed (GrdDBusGdmRemoteDisplay *remote_display,
|
||||
GParamSpec *pspec,
|
||||
@@ -604,6 +609,10 @@ remote_client_new (GrdDaemonSystem *daemon_system,
|
||||
@@ -601,6 +606,10 @@ remote_client_new (GrdDaemonSystem *daemon_system,
|
||||
remote_client = g_new0 (GrdRemoteClient, 1);
|
||||
remote_client->id = get_next_available_id (daemon_system);
|
||||
remote_client->daemon_system = daemon_system;
|
||||
@ -298,7 +302,7 @@ index 92b4d76..05b57f2 100644
|
||||
remote_client->is_client_mstsc = grd_session_rdp_is_client_mstsc (GRD_SESSION_RDP (session));
|
||||
remote_client->session = session;
|
||||
g_object_weak_ref (G_OBJECT (session),
|
||||
@@ -943,6 +952,9 @@ on_remote_display_remote_id_changed (GrdDBusGdmRemoteDisplay *remote_display,
|
||||
@@ -940,6 +949,9 @@ on_remote_display_remote_id_changed (GrdDBusGdmRemoteDisplay *remote_display,
|
||||
return;
|
||||
}
|
||||
|
||||
@ -308,7 +312,7 @@ index 92b4d76..05b57f2 100644
|
||||
g_debug ("[DaemonSystem] GDM updated a remote display with a new remote id: "
|
||||
"%s", remote_id);
|
||||
|
||||
@@ -989,23 +1001,65 @@ on_gdm_remote_display_session_id_changed (GrdDBusGdmRemoteDisplay *remote_displa
|
||||
@@ -986,23 +998,65 @@ on_gdm_remote_display_session_id_changed (GrdDBusGdmRemoteDisplay *remote_displa
|
||||
register_handover_iface (remote_client, session_id);
|
||||
}
|
||||
|
||||
@ -384,7 +388,7 @@ index 92b4d76..05b57f2 100644
|
||||
|
||||
disconnect_from_remote_display (remote_client);
|
||||
remote_client->remote_display = g_object_ref (remote_display);
|
||||
@@ -1052,7 +1106,12 @@ unregister_handover_for_display (GrdDaemonSystem *daemon_system,
|
||||
@@ -1049,7 +1103,12 @@ unregister_handover_for_display (GrdDaemonSystem *daemon_system,
|
||||
|
||||
session_id = grd_dbus_gdm_remote_display_get_session_id (remote_display);
|
||||
if (!session_id || g_str_equal (session_id, ""))
|
||||
@ -399,7 +403,7 @@ index 92b4d76..05b57f2 100644
|
||||
object_path = g_strdup_printf ("%s/session%s",
|
||||
REMOTE_DESKTOP_HANDOVERS_OBJECT_PATH,
|
||||
diff --git a/src/org.gnome.DisplayManager.xml b/src/org.gnome.DisplayManager.xml
|
||||
index 73e073c..145fe21 100644
|
||||
index 73e073c2..145fe219 100644
|
||||
--- a/src/org.gnome.DisplayManager.xml
|
||||
+++ b/src/org.gnome.DisplayManager.xml
|
||||
@@ -3,6 +3,9 @@
|
||||
@ -413,10 +417,10 @@ index 73e073c..145fe21 100644
|
||||
<interface name="org.gnome.DisplayManager.RemoteDisplayFactory">
|
||||
<method name="CreateRemoteDisplay">
|
||||
--
|
||||
2.51.0
|
||||
2.54.0
|
||||
|
||||
|
||||
From 259d160eb1a23ecd0bfffc207b8282087c78b597 Mon Sep 17 00:00:00 2001
|
||||
From 87325e8de21384847839a5651224b3c5143f6513 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Joan=20Torres=20L=C3=B3pez?= <joantolo@redhat.com>
|
||||
Date: Wed, 4 Jun 2025 12:12:41 +0200
|
||||
Subject: [PATCH 05/12] daemon-system: Consider previous remote displays
|
||||
@ -429,7 +433,7 @@ sessions.
|
||||
1 file changed, 31 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/grd-daemon-system.c b/src/grd-daemon-system.c
|
||||
index 05b57f2..8a372cb 100644
|
||||
index cf59dcc3..d32ec8ff 100644
|
||||
--- a/src/grd-daemon-system.c
|
||||
+++ b/src/grd-daemon-system.c
|
||||
@@ -83,6 +83,9 @@ struct _GrdDaemonSystem
|
||||
@ -442,7 +446,7 @@ index 05b57f2..8a372cb 100644
|
||||
static void
|
||||
grd_remote_client_free (GrdRemoteClient *remote_client);
|
||||
|
||||
@@ -989,7 +992,7 @@ on_gdm_remote_display_session_id_changed (GrdDBusGdmRemoteDisplay *remote_displa
|
||||
@@ -986,7 +989,7 @@ on_gdm_remote_display_session_id_changed (GrdDBusGdmRemoteDisplay *remote_displa
|
||||
if (!session_id || g_str_equal (session_id, ""))
|
||||
return;
|
||||
|
||||
@ -451,7 +455,7 @@ index 05b57f2..8a372cb 100644
|
||||
"and session: %s",
|
||||
remote_client->id,
|
||||
session_id);
|
||||
@@ -1073,7 +1076,7 @@ register_handover_for_display (GrdDaemonSystem *daemon_system,
|
||||
@@ -1070,7 +1073,7 @@ register_handover_for_display (GrdDaemonSystem *daemon_system,
|
||||
return;
|
||||
}
|
||||
|
||||
@ -460,7 +464,7 @@ index 05b57f2..8a372cb 100644
|
||||
"and session: %s",
|
||||
remote_client->id,
|
||||
session_id);
|
||||
@@ -1099,8 +1102,8 @@ unregister_handover_for_display (GrdDaemonSystem *daemon_system,
|
||||
@@ -1096,8 +1099,8 @@ unregister_handover_for_display (GrdDaemonSystem *daemon_system,
|
||||
remote_id, NULL,
|
||||
(gpointer *) &remote_client))
|
||||
{
|
||||
@ -471,7 +475,7 @@ index 05b57f2..8a372cb 100644
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1117,8 +1120,8 @@ unregister_handover_for_display (GrdDaemonSystem *daemon_system,
|
||||
@@ -1114,8 +1117,8 @@ unregister_handover_for_display (GrdDaemonSystem *daemon_system,
|
||||
REMOTE_DESKTOP_HANDOVERS_OBJECT_PATH,
|
||||
session_id);
|
||||
|
||||
@ -482,7 +486,7 @@ index 05b57f2..8a372cb 100644
|
||||
|
||||
if (remote_client->handover_src)
|
||||
{
|
||||
@@ -1148,6 +1151,26 @@ on_gdm_object_remote_display_interface_changed (GrdDaemonSystem *daemon_system,
|
||||
@@ -1145,6 +1148,26 @@ on_gdm_object_remote_display_interface_changed (GrdDaemonSystem *daemon_system,
|
||||
register_handover_for_display (daemon_system, remote_display);
|
||||
}
|
||||
|
||||
@ -509,7 +513,7 @@ index 05b57f2..8a372cb 100644
|
||||
static void
|
||||
on_gdm_object_added (GrdDaemonSystem *daemon_system,
|
||||
GrdDBusGdmObject *object)
|
||||
@@ -1219,6 +1242,8 @@ on_gdm_object_manager_client_acquired (GObject *source_object,
|
||||
@@ -1216,6 +1239,8 @@ on_gdm_object_manager_client_acquired (GObject *source_object,
|
||||
return;
|
||||
}
|
||||
|
||||
@ -519,10 +523,10 @@ index 05b57f2..8a372cb 100644
|
||||
"object-added",
|
||||
G_CALLBACK (on_gdm_object_added),
|
||||
--
|
||||
2.51.0
|
||||
2.54.0
|
||||
|
||||
|
||||
From 308890ed9dbdf401e9dd6f927273e32b43116164 Mon Sep 17 00:00:00 2001
|
||||
From 5e4c6385095d19c58b4937c0cb6647a2f008ba10 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Joan=20Torres=20L=C3=B3pez?= <joantolo@redhat.com>
|
||||
Date: Wed, 4 Jun 2025 12:16:23 +0200
|
||||
Subject: [PATCH 06/12] daemon-handover: Only logout when system daemon
|
||||
@ -545,7 +549,7 @@ login sessions will be terminated.
|
||||
1 file changed, 14 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/grd-daemon-handover.c b/src/grd-daemon-handover.c
|
||||
index f4eeafc..06f1814 100644
|
||||
index f4eeafc0..06f1814b 100644
|
||||
--- a/src/grd-daemon-handover.c
|
||||
+++ b/src/grd-daemon-handover.c
|
||||
@@ -649,6 +649,8 @@ on_gnome_remote_desktop_name_appeared (GDBusConnection *connection,
|
||||
@ -583,10 +587,10 @@ index f4eeafc..06f1814 100644
|
||||
|
||||
GrdDaemonHandover *
|
||||
--
|
||||
2.51.0
|
||||
2.54.0
|
||||
|
||||
|
||||
From f9ba1f19522fd84a98a6fbc3fce1f075cd25faee Mon Sep 17 00:00:00 2001
|
||||
From 3e724a58fce0a2e7523068b13abfe8cb3d86c527 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Joan=20Torres=20L=C3=B3pez?= <joantolo@redhat.com>
|
||||
Date: Fri, 20 Jun 2025 17:33:29 +0200
|
||||
Subject: [PATCH 07/12] daemon-system: Steal handover instead of
|
||||
@ -603,10 +607,10 @@ This way we ensure a consistent communication with the handover daemon.
|
||||
1 file changed, 42 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/grd-daemon-system.c b/src/grd-daemon-system.c
|
||||
index 8a372cb..3b5e4ca 100644
|
||||
index d32ec8ff..7343c9e1 100644
|
||||
--- a/src/grd-daemon-system.c
|
||||
+++ b/src/grd-daemon-system.c
|
||||
@@ -935,6 +935,45 @@ on_remote_display_factory_proxy_acquired (GObject *object,
|
||||
@@ -932,6 +932,45 @@ on_remote_display_factory_proxy_acquired (GObject *object,
|
||||
grd_daemon_maybe_enable_services (GRD_DAEMON (daemon_system));
|
||||
}
|
||||
|
||||
@ -652,7 +656,7 @@ index 8a372cb..3b5e4ca 100644
|
||||
static void
|
||||
on_remote_display_remote_id_changed (GrdDBusGdmRemoteDisplay *remote_display,
|
||||
GParamSpec *pspec,
|
||||
@@ -943,7 +982,6 @@ on_remote_display_remote_id_changed (GrdDBusGdmRemoteDisplay *remote_display,
|
||||
@@ -940,7 +979,6 @@ on_remote_display_remote_id_changed (GrdDBusGdmRemoteDisplay *remote_display,
|
||||
GrdDaemonSystem *daemon_system = remote_client->daemon_system;
|
||||
GrdRemoteClient *new_remote_client;
|
||||
const char *remote_id;
|
||||
@ -660,7 +664,7 @@ index 8a372cb..3b5e4ca 100644
|
||||
|
||||
remote_id = grd_dbus_gdm_remote_display_get_remote_id (remote_display);
|
||||
if (!g_hash_table_lookup_extended (daemon_system->remote_clients,
|
||||
@@ -967,13 +1005,12 @@ on_remote_display_remote_id_changed (GrdDBusGdmRemoteDisplay *remote_display,
|
||||
@@ -964,13 +1002,12 @@ on_remote_display_remote_id_changed (GrdDBusGdmRemoteDisplay *remote_display,
|
||||
G_CALLBACK (on_remote_display_remote_id_changed),
|
||||
new_remote_client);
|
||||
|
||||
@ -678,10 +682,10 @@ index 8a372cb..3b5e4ca 100644
|
||||
|
||||
static void
|
||||
--
|
||||
2.51.0
|
||||
2.54.0
|
||||
|
||||
|
||||
From 0c9b6d1f5e7cc6cc76e54653d6fcf61d027403f3 Mon Sep 17 00:00:00 2001
|
||||
From c77351d4f396aaea16e45b56887e7fdc417d4e71 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Joan=20Torres=20L=C3=B3pez?= <joantolo@redhat.com>
|
||||
Date: Fri, 20 Jun 2025 17:46:06 +0200
|
||||
Subject: [PATCH 08/12] daemon-handover: Move get_credentials in start_handover
|
||||
@ -692,7 +696,7 @@ This avoids duplicating the code.
|
||||
1 file changed, 14 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/src/grd-daemon-handover.c b/src/grd-daemon-handover.c
|
||||
index 06f1814..a9ec8d8 100644
|
||||
index 06f1814b..a9ec8d8e 100644
|
||||
--- a/src/grd-daemon-handover.c
|
||||
+++ b/src/grd-daemon-handover.c
|
||||
@@ -265,14 +265,21 @@ on_start_handover_finished (GObject *object,
|
||||
@ -767,10 +771,10 @@ index 06f1814..a9ec8d8 100644
|
||||
|
||||
static void
|
||||
--
|
||||
2.51.0
|
||||
2.54.0
|
||||
|
||||
|
||||
From 9e51b8936dfe413f782c51179e45a868ffeff4d1 Mon Sep 17 00:00:00 2001
|
||||
From 614f8a813cb0a0237cd98d82eef7334e56e6c048 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Joan=20Torres=20L=C3=B3pez?= <joantolo@redhat.com>
|
||||
Date: Fri, 20 Jun 2025 17:50:27 +0200
|
||||
Subject: [PATCH 09/12] daemon-system: Change restart signal to
|
||||
@ -791,7 +795,7 @@ start_handover will only be called when needed.
|
||||
3 files changed, 36 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/src/grd-daemon-handover.c b/src/grd-daemon-handover.c
|
||||
index a9ec8d8..3c9e34f 100644
|
||||
index a9ec8d8e..3c9e34f4 100644
|
||||
--- a/src/grd-daemon-handover.c
|
||||
+++ b/src/grd-daemon-handover.c
|
||||
@@ -448,16 +448,22 @@ on_rdp_server_started (GrdDaemonHandover *daemon_handover)
|
||||
@ -853,7 +857,7 @@ index a9ec8d8..3c9e34f 100644
|
||||
grd_daemon_maybe_enable_services (GRD_DAEMON (daemon_handover));
|
||||
}
|
||||
diff --git a/src/grd-daemon-system.c b/src/grd-daemon-system.c
|
||||
index 3b5e4ca..950d539 100644
|
||||
index 7343c9e1..bdacbe00 100644
|
||||
--- a/src/grd-daemon-system.c
|
||||
+++ b/src/grd-daemon-system.c
|
||||
@@ -63,6 +63,7 @@ typedef struct
|
||||
@ -864,7 +868,7 @@ index 3b5e4ca..950d539 100644
|
||||
|
||||
GrdDBusGdmRemoteDisplay *remote_display;
|
||||
} GrdRemoteClient;
|
||||
@@ -189,6 +190,9 @@ on_handle_take_client (GrdDBusRemoteDesktopRdpHandover *interface,
|
||||
@@ -188,6 +189,9 @@ on_handle_take_client (GrdDBusRemoteDesktopRdpHandover *interface,
|
||||
g_clear_object (&remote_client->socket_connection);
|
||||
g_clear_handle_id (&remote_client->abort_handover_source_id, g_source_remove);
|
||||
|
||||
@ -874,7 +878,7 @@ index 3b5e4ca..950d539 100644
|
||||
return G_DBUS_METHOD_INVOCATION_HANDLED;
|
||||
}
|
||||
|
||||
@@ -511,6 +515,9 @@ handover_iface_new (const char *session_id,
|
||||
@@ -510,6 +514,9 @@ handover_iface_new (const char *session_id,
|
||||
g_signal_connect (handover->interface, "handle-get-system-credentials",
|
||||
G_CALLBACK (on_handle_get_system_credentials), remote_client);
|
||||
|
||||
@ -884,7 +888,7 @@ index 3b5e4ca..950d539 100644
|
||||
return handover;
|
||||
}
|
||||
|
||||
@@ -612,6 +619,7 @@ remote_client_new (GrdDaemonSystem *daemon_system,
|
||||
@@ -609,6 +616,7 @@ remote_client_new (GrdDaemonSystem *daemon_system,
|
||||
remote_client = g_new0 (GrdRemoteClient, 1);
|
||||
remote_client->id = get_next_available_id (daemon_system);
|
||||
remote_client->daemon_system = daemon_system;
|
||||
@ -892,7 +896,7 @@ index 3b5e4ca..950d539 100644
|
||||
|
||||
if (!session)
|
||||
return remote_client;
|
||||
@@ -1007,8 +1015,8 @@ on_remote_display_remote_id_changed (GrdDBusGdmRemoteDisplay *remote_display,
|
||||
@@ -1004,8 +1012,8 @@ on_remote_display_remote_id_changed (GrdDBusGdmRemoteDisplay *remote_display,
|
||||
|
||||
steal_handover_from_client (new_remote_client, remote_client);
|
||||
|
||||
@ -904,10 +908,10 @@ index 3b5e4ca..950d539 100644
|
||||
g_hash_table_remove (daemon_system->remote_clients, remote_client->id);
|
||||
}
|
||||
diff --git a/src/org.gnome.RemoteDesktop.xml b/src/org.gnome.RemoteDesktop.xml
|
||||
index 3fda8ec..38b35a3 100644
|
||||
index 9e4cb1af..a44896d7 100644
|
||||
--- a/src/org.gnome.RemoteDesktop.xml
|
||||
+++ b/src/org.gnome.RemoteDesktop.xml
|
||||
@@ -194,12 +194,11 @@
|
||||
@@ -190,12 +190,11 @@
|
||||
</method>
|
||||
|
||||
<!--
|
||||
@ -925,10 +929,10 @@ index 3fda8ec..38b35a3 100644
|
||||
</interface>
|
||||
|
||||
--
|
||||
2.51.0
|
||||
2.54.0
|
||||
|
||||
|
||||
From a030f48f43412f44f4c7c1b5d12c6763cd95cad4 Mon Sep 17 00:00:00 2001
|
||||
From 76af31dac4d7d6418589f3de59c6d2c359367637 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Joan=20Torres=20L=C3=B3pez?= <joantolo@redhat.com>
|
||||
Date: Wed, 25 Jun 2025 13:20:51 +0200
|
||||
Subject: [PATCH 10/12] rdp-server: Inform new connection in its dbus iface
|
||||
@ -940,10 +944,10 @@ This will be used in next commits.
|
||||
2 files changed, 12 insertions(+)
|
||||
|
||||
diff --git a/src/grd-rdp-server.c b/src/grd-rdp-server.c
|
||||
index b6d5234..0c7ebec 100644
|
||||
index cb3ce4d3..40a184a8 100644
|
||||
--- a/src/grd-rdp-server.c
|
||||
+++ b/src/grd-rdp-server.c
|
||||
@@ -166,7 +166,12 @@ static void
|
||||
@@ -154,7 +154,12 @@ static void
|
||||
on_session_post_connect (GrdSessionRdp *session_rdp,
|
||||
GrdRdpServer *rdp_server)
|
||||
{
|
||||
@ -957,10 +961,10 @@ index b6d5234..0c7ebec 100644
|
||||
|
||||
static void
|
||||
diff --git a/src/org.gnome.RemoteDesktop.xml b/src/org.gnome.RemoteDesktop.xml
|
||||
index 38b35a3..d42bf93 100644
|
||||
index a44896d7..a2e5a830 100644
|
||||
--- a/src/org.gnome.RemoteDesktop.xml
|
||||
+++ b/src/org.gnome.RemoteDesktop.xml
|
||||
@@ -46,6 +46,13 @@
|
||||
@@ -44,6 +44,13 @@
|
||||
<arg name="port" type="i" />
|
||||
</signal>
|
||||
|
||||
@ -975,10 +979,10 @@ index 38b35a3..d42bf93 100644
|
||||
|
||||
<!--
|
||||
--
|
||||
2.51.0
|
||||
2.54.0
|
||||
|
||||
|
||||
From cef80a4e437773971769507022fe16208b428caf Mon Sep 17 00:00:00 2001
|
||||
From 04962e398652f53359142698c1c4132fc005f441 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Joan=20Torres=20L=C3=B3pez?= <joantolo@redhat.com>
|
||||
Date: Wed, 25 Jun 2025 13:22:06 +0200
|
||||
Subject: [PATCH 11/12] rdp-server: Allow terminating all sessions
|
||||
@ -990,11 +994,11 @@ This will be used in next commits.
|
||||
2 files changed, 13 insertions(+)
|
||||
|
||||
diff --git a/src/grd-rdp-server.c b/src/grd-rdp-server.c
|
||||
index bd7257e..3d6e7d2 100644
|
||||
index 40a184a8..95810a26 100644
|
||||
--- a/src/grd-rdp-server.c
|
||||
+++ b/src/grd-rdp-server.c
|
||||
@@ -272,6 +272,17 @@ grd_rdp_server_notify_incoming (GSocketService *service,
|
||||
on_incoming (service, connection);
|
||||
@@ -291,6 +291,17 @@ grd_rdp_server_notify_incoming (GSocketService *service,
|
||||
}
|
||||
}
|
||||
|
||||
+void
|
||||
@ -1012,7 +1016,7 @@ index bd7257e..3d6e7d2 100644
|
||||
attempt_to_bind_port (gpointer user_data)
|
||||
{
|
||||
diff --git a/src/grd-rdp-server.h b/src/grd-rdp-server.h
|
||||
index d2e2e29..88d2ad8 100644
|
||||
index d2e2e292..88d2ad82 100644
|
||||
--- a/src/grd-rdp-server.h
|
||||
+++ b/src/grd-rdp-server.h
|
||||
@@ -41,3 +41,5 @@ GrdRdpServer *grd_rdp_server_new (GrdContext *context);
|
||||
@ -1021,7 +1025,11 @@ index d2e2e29..88d2ad8 100644
|
||||
GSocketConnection *connection);
|
||||
+
|
||||
+void grd_rdp_server_stop_sessions (GrdRdpServer *rdp_server);
|
||||
From d139b3cf3b7959184ca89d51581475bd93e91379 Mon Sep 17 00:00:00 2001
|
||||
--
|
||||
2.54.0
|
||||
|
||||
|
||||
From 08638b936c2bf1712e0934fee516ca28b5e9523e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Joan=20Torres=20L=C3=B3pez?= <joantolo@redhat.com>
|
||||
Date: Wed, 25 Jun 2025 13:33:29 +0200
|
||||
Subject: [PATCH 12/12] daemon: Ensure only one single connection for headless
|
||||
@ -1042,7 +1050,7 @@ starts a new connection.
|
||||
2 files changed, 123 insertions(+)
|
||||
|
||||
diff --git a/src/grd-daemon.c b/src/grd-daemon.c
|
||||
index eaeb480..d1cb1ac 100644
|
||||
index 7e1a0a34..7727e148 100644
|
||||
--- a/src/grd-daemon.c
|
||||
+++ b/src/grd-daemon.c
|
||||
@@ -86,6 +86,8 @@ typedef struct _GrdDaemonPrivate
|
||||
@ -1054,7 +1062,7 @@ index eaeb480..d1cb1ac 100644
|
||||
#endif
|
||||
#ifdef HAVE_VNC
|
||||
GrdVncServer *vnc_server;
|
||||
@@ -275,6 +277,8 @@ stop_rdp_server (GrdDaemon *daemon)
|
||||
@@ -261,6 +263,8 @@ stop_rdp_server (GrdDaemon *daemon)
|
||||
|
||||
g_signal_emit (daemon, signals[RDP_SERVER_STOPPED], 0);
|
||||
grd_rdp_server_stop (priv->rdp_server);
|
||||
@ -1063,7 +1071,7 @@ index eaeb480..d1cb1ac 100644
|
||||
g_clear_object (&priv->rdp_server);
|
||||
g_clear_handle_id (&priv->restart_rdp_server_source_id, g_source_remove);
|
||||
g_message ("RDP server stopped");
|
||||
@@ -287,10 +291,105 @@ on_rdp_server_binding_failed (GrdRdpServer *rdp_server,
|
||||
@@ -273,10 +277,105 @@ on_rdp_server_binding_failed (GrdRdpServer *rdp_server,
|
||||
stop_rdp_server (daemon);
|
||||
}
|
||||
|
||||
@ -1169,7 +1177,7 @@ index eaeb480..d1cb1ac 100644
|
||||
g_autoptr (GError) error = NULL;
|
||||
|
||||
g_assert (!priv->rdp_server);
|
||||
@@ -307,6 +406,10 @@ start_rdp_server (GrdDaemon *daemon)
|
||||
@@ -293,6 +392,10 @@ start_rdp_server (GrdDaemon *daemon)
|
||||
{
|
||||
g_signal_emit (daemon, signals[RDP_SERVER_STARTED], 0);
|
||||
g_message ("RDP server started");
|
||||
@ -1181,10 +1189,10 @@ index eaeb480..d1cb1ac 100644
|
||||
}
|
||||
|
||||
diff --git a/src/grd-rdp-server.c b/src/grd-rdp-server.c
|
||||
index cb191eb..2180126 100644
|
||||
index 95810a26..d7ecae3b 100644
|
||||
--- a/src/grd-rdp-server.c
|
||||
+++ b/src/grd-rdp-server.c
|
||||
@@ -162,16 +162,36 @@ on_session_stopped (GrdSession *session,
|
||||
@@ -150,16 +150,36 @@ on_session_stopped (GrdSession *session,
|
||||
}
|
||||
}
|
||||
|
||||
@ -1222,5 +1230,5 @@ index cb191eb..2180126 100644
|
||||
|
||||
static void
|
||||
--
|
||||
2.51.0
|
||||
2.54.0
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -22,6 +22,8 @@ Source0: https://download.gnome.org/sources/%{name}/49/%{name}-%{tarball_
|
||||
|
||||
# Adds encryption support (requires patched LibVNCServer)
|
||||
Patch0: gnutls-anontls.patch
|
||||
|
||||
# Connection throttling (RHEL-222511)
|
||||
Patch1: connection-throttling.patch
|
||||
|
||||
# Depends on FreeRDP 3.15; drop this patch once FreeRDP is updated.
|
||||
@ -33,6 +35,7 @@ Patch4: 0001-daemon-handover-Move-callback-definitions-earlier-in.patch
|
||||
Patch5: 0001-daemon-system-Respect-existing-remote_id-from-third-.patch
|
||||
|
||||
BuildRequires: asciidoc
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: meson >= 1.4.0
|
||||
BuildRequires: systemd-rpm-macros
|
||||
|
||||
Loading…
Reference in New Issue
Block a user