From 1aae354efc50def1c76a8b54112e87d6a95f8ff8 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jan 25 2018 09:28:39 +0000 Subject: import gdm-3.22.3-13.el7_4 --- diff --git a/SOURCES/0001-manager-fix-dangling-pointer-free.patch b/SOURCES/0001-manager-fix-dangling-pointer-free.patch new file mode 100644 index 0000000..30d6ac7 --- /dev/null +++ b/SOURCES/0001-manager-fix-dangling-pointer-free.patch @@ -0,0 +1,89 @@ +From 0317fe746acc1f14bcb64d740de813f9ca8f4e70 Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Wed, 23 Aug 2017 09:26:11 -0400 +Subject: [PATCH] manager: fix dangling pointer free + +When reauthenticating, we can crash if no login screen +is running on the seat (for instance, when building +with --disable-user-display-server, and not user +switching). The crash is due to a dangling +pointer. + +This commit fixes that. + +https://bugzilla.gnome.org/show_bug.cgi?id=786656 +--- + daemon/gdm-manager.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c +index 3eef745f..f001a36e 100644 +--- a/daemon/gdm-manager.c ++++ b/daemon/gdm-manager.c +@@ -2003,62 +2003,62 @@ on_user_session_died (GdmSession *session, + static char * + get_display_device (GdmManager *manager, + GdmDisplay *display) + { + /* systemd finds the display device out on its own based on the display */ + return NULL; + } + + static void + on_session_reauthenticated (GdmSession *session, + const char *service_name, + 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); + } +- 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), + * then silently succeed and unlock the session. + */ + switch_to_compatible_user_session (manager, session, fail_if_already_switched); + } + + static void + on_session_client_ready_for_session_to_start (GdmSession *session, + const char *service_name, + gboolean client_is_ready, + GdmManager *manager) + { + gboolean waiting_to_start_user_session; + + if (client_is_ready) { + g_debug ("GdmManager: Will start session when ready"); + } else { + g_debug ("GdmManager: Will start session when ready and told"); + } + + waiting_to_start_user_session = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (session), + "waiting-to-start")); + + g_object_set_data (G_OBJECT (session), + "start-when-ready", + GINT_TO_POINTER (client_is_ready)); +-- +2.14.3 + diff --git a/SPECS/gdm.spec b/SPECS/gdm.spec index 9a5289f..eda43c1 100644 --- a/SPECS/gdm.spec +++ b/SPECS/gdm.spec @@ -12,7 +12,7 @@ Summary: The GNOME Display Manager Name: gdm Version: 3.22.3 -Release: 12%{?dist} +Release: 13%{?dist} Epoch: 1 License: GPLv2+ Group: User Interface/X @@ -44,6 +44,7 @@ Patch16: 0001-manager-update-session-id-property-when-reusing-disp.patch Patch80: 0001-Revert-session-forward-is-initial-from-display-to-wo.patch Patch81: 0001-worker-add-compat-patch-to-make-new-worker-work-with.patch Patch82: 0001-legacy-display-ensure-X-server-is-dead-when-respawni.patch +Patch83: 0001-manager-fix-dangling-pointer-free.patch Patch95: audit-4.patch Patch96: clear-screen.patch @@ -339,6 +340,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_libdir}/pkgconfig/gdm.pc %changelog +* Mon Dec 04 2017 Ray Strode - 3.22.3-13 +- fix reauth crash + Resolves: #1519250 + * Wed Jul 12 2017 Ray Strode - 3.22.3-12 - Ensure X server is dead after logout Resolves: #1469755