[gdm] manager: stop transient greeter session when done with it
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] manager: stop transient greeter session when done with it
- Date: Wed, 12 Apr 2017 13:47:30 +0000 (UTC)
commit 21905303afbd508f3bf599ad219c9209413c53a2
Author: Ray Strode <rstrode redhat com>
Date: Wed Apr 5 12:11:20 2017 -0400
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
daemon/gdm-manager.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 5d4d6c2..b909976 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),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]