[gdm] manager: make sure a session's display knows about the session



commit a95b9657ffebc4b1e1bb794baf81de3cdac19cae
Author: Ray Strode <rstrode redhat com>
Date:   Fri Aug 18 20:33:35 2017 -0400

    manager: make sure a session's display knows about the session
    
    When logging into a session that runs on another VT, we create a
    new display object for it.  That display object needs to know
    about the session, so we can find the session when reauthenticating
    against the display.
    
    The code that links the two together was missing.  This commit
    adds it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=784555

 daemon/gdm-manager.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 58926df..148de5a 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -126,9 +126,9 @@ static void     gdm_manager_dispose     (GObject         *object);
 static GdmSession *create_user_session_for_display (GdmManager *manager,
                                                     GdmDisplay *display,
                                                     uid_t       allowed_user);
-
 static void     start_user_session (GdmManager                *manager,
                                     StartUserSessionOperation *operation);
+static void     clean_user_session (GdmSession *session);
 
 static gpointer manager_object = NULL;
 
@@ -1778,6 +1778,11 @@ create_display_for_user_session (GdmManager *self,
         gdm_display_store_add (self->priv->display_store,
                                display);
         g_object_set_data (G_OBJECT (session), "gdm-display", display);
+        g_object_set_data_full (G_OBJECT (display),
+                                "gdm-user-session",
+                                g_object_ref (session),
+                                (GDestroyNotify)
+                                clean_user_session);
 }
 
 static gboolean


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]