summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2017-04-05 12:11:20 -0400
committerRay Strode <rstrode@redhat.com>2017-04-12 09:47:10 -0400
commit21905303afbd508f3bf599ad219c9209413c53a2 (patch)
treef5f8f413ed55105b7cac62b6eb0af834bebc6442
parent22c332baaf8ad6d7082c5b01250bae70934c2fd1 (diff)
downloadgdm-21905303afbd508f3bf599ad219c9209413c53a2.tar.gz
manager: stop transient greeter session when done with it
If we're running in legacy display mode, we currently can end up with a leaked greeter following user switching. That can happen if a user with an already running session is reauthenticated (so the login screen won't morph into the use session). This commit makes sure we kill the greeter session off in that case. https://bugzilla.gnome.org/show_bug.cgi?id=780939
-rw-r--r--daemon/gdm-manager.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 5d4d6c29..b9099763 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -2022,6 +2022,26 @@ on_session_reauthenticated (GdmSession *session,
GdmManager *manager)
{
gboolean fail_if_already_switched = FALSE;
+
+ if (gdm_session_get_display_mode (session) == GDM_SESSION_DISPLAY_MODE_REUSE_VT) {
+ const char *seat_id;
+ char *session_id;
+
+ seat_id = gdm_session_get_display_seat_id (session);
+ if (get_login_window_session_id (seat_id, &session_id)) {
+ GdmDisplay *display = gdm_display_store_find (manager->priv->display_store,
+ lookup_by_session_id,
+ (gpointer) session_id);
+
+ if (display != NULL) {
+ gdm_display_stop_greeter_session (display);
+ gdm_display_unmanage (display);
+ gdm_display_finish (display);
+ }
+ }
+ g_free (session_id);
+ }
+
/* There should already be a session running, so jump to its
* VT. In the event we're already on the right VT, (i.e. user
* used an unlock screen instead of a user switched login screen),