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

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