summaryrefslogtreecommitdiff
path: root/daemon/gdm-display-store.c
diff options
context:
space:
mode:
authorChris Coulson <chris.coulson@canonical.com>2018-07-19 18:26:05 +0100
committerRay Strode <rstrode@redhat.com>2018-08-13 10:35:09 -0400
commit1ac1697b3b019f50729a6e992065959586e170da (patch)
tree150e148d1533564df003c9644e51ad8974977a62 /daemon/gdm-display-store.c
parent0e92e2c93a65544892d65c3f5950a2d5f8dc7f46 (diff)
downloadgdm-1ac1697b3b019f50729a6e992065959586e170da.tar.gz
display-store: Pass the display object rather than the id in the removed signal
By the time GdmDisplayStore emits the "display-removed" signal, the display is no longer in the store and gdm_display_store_lookup will not work in signal handlers. Change the "display-removed" parameter from the display id to the GdmDisplay object, so that signal handers can perform any cleanup they need to do CVE-2018-14424 Closes: https://gitlab.gnome.org/GNOME/gdm/issues/401
Diffstat (limited to 'daemon/gdm-display-store.c')
-rw-r--r--daemon/gdm-display-store.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/daemon/gdm-display-store.c b/daemon/gdm-display-store.c
index af76f519..fd24334e 100644
--- a/daemon/gdm-display-store.c
+++ b/daemon/gdm-display-store.c
@@ -76,15 +76,10 @@ stored_display_new (GdmDisplayStore *store,
static void
stored_display_free (StoredDisplay *stored_display)
{
- char *id;
-
- gdm_display_get_id (stored_display->display, &id, NULL);
-
g_signal_emit (G_OBJECT (stored_display->store),
signals[DISPLAY_REMOVED],
0,
- id);
- g_free (id);
+ stored_display->display);
g_debug ("GdmDisplayStore: Unreffing display: %p",
stored_display->display);
@@ -281,9 +276,9 @@ gdm_display_store_class_init (GdmDisplayStoreClass *klass)
G_STRUCT_OFFSET (GdmDisplayStoreClass, display_removed),
NULL,
NULL,
- g_cclosure_marshal_VOID__STRING,
+ g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE,
- 1, G_TYPE_STRING);
+ 1, G_TYPE_OBJECT);
g_type_class_add_private (klass, sizeof (GdmDisplayStorePrivate));
}