diff options
author | Ray Strode <rstrode@redhat.com> | 2017-05-04 15:34:33 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2017-05-04 16:11:55 -0400 |
commit | 5de378f3339e9b8b965c9db21e2de143fd63ba39 (patch) | |
tree | 8bb207e58607b2b5a93dbdf0d2832b76f82141b6 /daemon | |
parent | d7eda0dde0abaade523b1485e1803cee29d1c824 (diff) | |
download | gdm-5de378f3339e9b8b965c9db21e2de143fd63ba39.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
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/gdm-manager.c | 12 |
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); |