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

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