summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2017-05-04 15:34:33 -0400
committerRay Strode <rstrode@redhat.com>2017-05-09 17:09:32 -0400
commita00aeda7b9a0311271551754761c5279290fab69 (patch)
tree4e3512027b390777a3a7b7d4b3a8cca87a8ba260
parent88254fe1aa29ca8c5a61d231bd880b7fb6be5d69 (diff)
downloadgdm-a00aeda7b9a0311271551754761c5279290fab69.tar.gz
manager: update session-id property when reusing display
If a display starts out its life as a greeter display, and then gets reused for the user session, we need to update the session-id property on the display to match its new session. This is important so the reauthentication mechanism is able to match the session with existing display and run in the proper context. https://bugzilla.gnome.org/show_bug.cgi?id=782182
-rw-r--r--daemon/gdm-manager.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index b9b230a4..994886f9 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -1789,6 +1789,7 @@ on_start_user_session (StartUserSessionOperation *operation)
gboolean doing_initial_setup = FALSE;
gboolean starting_user_session_right_away = TRUE;
GdmDisplay *display;
+ const char *session_id;
g_debug ("GdmManager: start or jump to session");
@@ -1813,14 +1814,19 @@ on_start_user_session (StartUserSessionOperation *operation)
g_object_get (G_OBJECT (display), "doing-initial-setup", &doing_initial_setup, NULL);
+ session_id = gdm_session_get_conversation_session_id (operation->session,
+ operation->service_name);
+
if (gdm_session_get_display_mode (operation->session) == GDM_SESSION_DISPLAY_MODE_REUSE_VT) {
/* In this case, the greeter's display is morphing into
* the user session display. Kill the greeter on this session
* and let the user session follow the same display. */
gdm_display_stop_greeter_session (display);
- g_object_set (G_OBJECT (display), "session-class", "user", NULL);
+ g_object_set (G_OBJECT (display),
+ "session-class", "user",
+ "session-id", session_id,
+ NULL);
} else {
- const char *session_id;
uid_t allowed_uid;
g_object_ref (display);
@@ -1857,8 +1863,6 @@ on_start_user_session (StartUserSessionOperation *operation)
}
/* Give the user session a new display object for bookkeeping purposes */
- session_id = gdm_session_get_conversation_session_id (operation->session,
- operation->service_name);
create_display_for_user_session (operation->manager,
operation->session,
session_id);