Blame SOURCES/0002-manager-stop-transient-greeter-session-when-done-wit.patch

2fc437
From 66250ce6402087d2e08f2008782edc02a0d013b0 Mon Sep 17 00:00:00 2001
2fc437
From: Ray Strode <rstrode@redhat.com>
2fc437
Date: Wed, 5 Apr 2017 12:11:20 -0400
2fc437
Subject: [PATCH 2/2] manager: stop transient greeter session when done with it
2fc437
2fc437
If we're running in legacy display mode, we currently can
2fc437
end up with a leaked greeter following user switching.
2fc437
That can happen if a user with an already running session
2fc437
is reauthenticated (so the login screen won't morph into the
2fc437
use session).
2fc437
2fc437
This commit makes sure we kill the greeter session off in that
2fc437
case.
2fc437
---
2fc437
 daemon/gdm-manager.c | 20 ++++++++++++++++++++
2fc437
 1 file changed, 20 insertions(+)
2fc437
2fc437
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
2fc437
index 6ffb842..9201b9f 100644
2fc437
--- a/daemon/gdm-manager.c
2fc437
+++ b/daemon/gdm-manager.c
2fc437
@@ -2010,6 +2010,26 @@ on_session_reauthenticated (GdmSession *session,
2fc437
                             GdmManager *manager)
2fc437
 {
2fc437
         gboolean fail_if_already_switched = FALSE;
2fc437
+
2fc437
+        if (gdm_session_get_display_mode (session) == GDM_SESSION_DISPLAY_MODE_REUSE_VT) {
2fc437
+                const char *seat_id;
2fc437
+                char *session_id;
2fc437
+
2fc437
+                seat_id = gdm_session_get_display_seat_id (session);
2fc437
+                if (get_login_window_session_id (seat_id, &session_id)) {
2fc437
+                        GdmDisplay *display = gdm_display_store_find (manager->priv->display_store,
2fc437
+                                                                      lookup_by_session_id,
2fc437
+                                                                      (gpointer) session_id);
2fc437
+
2fc437
+                        if (display != NULL) {
2fc437
+                                gdm_display_stop_greeter_session (display);
2fc437
+                                gdm_display_unmanage (display);
2fc437
+                                gdm_display_finish (display);
2fc437
+                        }
2fc437
+                }
2fc437
+                g_free (session_id);
2fc437
+        }
2fc437
+
2fc437
         /* There should already be a session running, so jump to its
2fc437
          * VT. In the event we're already on the right VT, (i.e. user
2fc437
          * used an unlock screen instead of a user switched login screen),
2fc437
-- 
2fc437
1.8.3.1
2fc437