Blame SOURCES/0001-xdmcp-display-factory-Set-supported-session-types-fo.patch

4e44f9
From 36b9fd4f6e055e236175979d9a1527df71aeac1f Mon Sep 17 00:00:00 2001
4e44f9
From: Ray Strode <rstrode@redhat.com>
4e44f9
Date: Tue, 14 Sep 2021 11:00:33 -0400
4e44f9
Subject: [PATCH 1/5] xdmcp-display-factory: Set supported session types for
4e44f9
 XDMCP displays
4e44f9
4e44f9
The lower levels of GDM now expect the session types supported by a
4e44f9
display to be specified up front.
4e44f9
4e44f9
This commit makes sure XDMCP displays do that.
4e44f9
---
4e44f9
 daemon/gdm-xdmcp-display-factory.c | 6 ++++++
4e44f9
 1 file changed, 6 insertions(+)
4e44f9
4e44f9
diff --git a/daemon/gdm-xdmcp-display-factory.c b/daemon/gdm-xdmcp-display-factory.c
4e44f9
index ce8f026e..abb58fae 100644
4e44f9
--- a/daemon/gdm-xdmcp-display-factory.c
4e44f9
+++ b/daemon/gdm-xdmcp-display-factory.c
4e44f9
@@ -2104,94 +2104,100 @@ on_display_status_changed (GdmDisplay             *display,
4e44f9
                 break;
4e44f9
         case GDM_DISPLAY_MANAGED:
4e44f9
                 if (session != NULL) {
4e44f9
                         g_signal_connect_object (G_OBJECT (session),
4e44f9
                                                  "client-disconnected",
4e44f9
                                                  G_CALLBACK (on_client_disconnected),
4e44f9
                                                  display, G_CONNECT_SWAPPED);
4e44f9
                         g_signal_connect_object (G_OBJECT (session),
4e44f9
                                                  "disconnected",
4e44f9
                                                  G_CALLBACK (on_client_disconnected),
4e44f9
                                                  display, G_CONNECT_SWAPPED);
4e44f9
                 }
4e44f9
                 break;
4e44f9
         default:
4e44f9
                 g_assert_not_reached ();
4e44f9
                 break;
4e44f9
         }
4e44f9
 
4e44f9
         g_clear_object (&launch_environment);
4e44f9
 }
4e44f9
 
4e44f9
 static GdmDisplay *
4e44f9
 gdm_xdmcp_display_create (GdmXdmcpDisplayFactory *factory,
4e44f9
                           const char             *hostname,
4e44f9
                           GdmAddress             *address,
4e44f9
                           int                     displaynum)
4e44f9
 {
4e44f9
         GdmDisplay      *display;
4e44f9
         GdmDisplayStore *store;
4e44f9
         gboolean         use_chooser;
4e44f9
+        const char      *session_types[] = { "x11", NULL };
4e44f9
 
4e44f9
         g_debug ("GdmXdmcpDisplayFactory: Creating xdmcp display for %s:%d",
4e44f9
                 hostname ? hostname : "(null)", displaynum);
4e44f9
 
4e44f9
         use_chooser = FALSE;
4e44f9
         if (factory->honor_indirect) {
4e44f9
                 IndirectClient *ic;
4e44f9
 
4e44f9
                 ic = indirect_client_lookup (factory, address);
4e44f9
 
4e44f9
                 /* This was an indirect thingie and nothing was yet chosen,
4e44f9
                  * use a chooser */
4e44f9
                 if (ic != NULL && ic->chosen_address == NULL) {
4e44f9
                         use_chooser = TRUE;
4e44f9
                 }
4e44f9
         }
4e44f9
 
4e44f9
         if (use_chooser) {
4e44f9
                 display = gdm_xdmcp_chooser_display_new (hostname,
4e44f9
                                                          displaynum,
4e44f9
                                                          address,
4e44f9
                                                          get_next_session_serial (factory));
4e44f9
                 g_signal_connect (display, "hostname-selected", G_CALLBACK (on_hostname_selected), factory);
4e44f9
         } else {
4e44f9
                 display = gdm_xdmcp_display_new (hostname,
4e44f9
                                                  displaynum,
4e44f9
                                                  address,
4e44f9
                                                  get_next_session_serial (factory));
4e44f9
         }
4e44f9
 
4e44f9
         if (display == NULL) {
4e44f9
                 goto out;
4e44f9
         }
4e44f9
 
4e44f9
+        g_object_set (G_OBJECT (display),
4e44f9
+                      "session-type", session_types[0],
4e44f9
+                      "supported-session-types", session_types,
4e44f9
+                      NULL);
4e44f9
+
4e44f9
         if (! gdm_display_prepare (display)) {
4e44f9
                 gdm_display_unmanage (display);
4e44f9
                 g_object_unref (display);
4e44f9
                 display = NULL;
4e44f9
                 goto out;
4e44f9
         }
4e44f9
 
4e44f9
         g_signal_connect_after (display,
4e44f9
                                 "notify::status",
4e44f9
                                 G_CALLBACK (on_display_status_changed),
4e44f9
                                 factory);
4e44f9
 
4e44f9
         store = gdm_display_factory_get_display_store (GDM_DISPLAY_FACTORY (factory));
4e44f9
         gdm_display_store_add (store, display);
4e44f9
 
4e44f9
         factory->num_pending_sessions++;
4e44f9
  out:
4e44f9
 
4e44f9
         return display;
4e44f9
 }
4e44f9
 
4e44f9
 static void
4e44f9
 gdm_xdmcp_send_accept (GdmXdmcpDisplayFactory *factory,
4e44f9
                        GdmAddress             *address,
4e44f9
                        CARD32                  session_id,
4e44f9
                        ARRAY8Ptr               authentication_name,
4e44f9
                        ARRAY8Ptr               authentication_data,
4e44f9
                        ARRAY8Ptr               authorization_name,
4e44f9
                        ARRAY8Ptr               authorization_data)
4e44f9
 {
4e44f9
-- 
4e44f9
2.34.1
4e44f9