[gdm] xdmcp-display: don't set MANAGED until we've connected



commit a86205badf0a0b953cdadf386999d0c0c5f6a2fb
Author: Ray Strode <rstrode redhat com>
Date:   Fri Mar 31 14:52:23 2017 -0400

    xdmcp-display: don't set MANAGED until we've connected
    
    We don't want to start the greeter session until we've
    successfully connected to the display ourselves!
    
    This prevents a race where session processes may inadvertently
     get the initial connection to the display server, causing
    premature resets.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=780787

 daemon/gdm-xdmcp-display.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gdm-xdmcp-display.c b/daemon/gdm-xdmcp-display.c
index c9f9c3d..630844f 100644
--- a/daemon/gdm-xdmcp-display.c
+++ b/daemon/gdm-xdmcp-display.c
@@ -193,6 +193,7 @@ idle_connect_to_display (GdmXdmcpDisplay *self)
 
         res = gdm_display_connect (GDM_DISPLAY (self));
         if (res) {
+                g_object_set (G_OBJECT (self), "status", GDM_DISPLAY_MANAGED, NULL);
         } else {
                 if (self->priv->connection_attempts >= MAX_CONNECT_ATTEMPTS) {
                         g_warning ("Unable to connect to display after %d tries - bailing out", 
self->priv->connection_attempts);
@@ -211,8 +212,6 @@ gdm_xdmcp_display_manage (GdmDisplay *display)
         GdmXdmcpDisplay *self = GDM_XDMCP_DISPLAY (display);
 
         g_timeout_add (500, (GSourceFunc)idle_connect_to_display, self);
-
-        g_object_set (G_OBJECT (self), "status", GDM_DISPLAY_MANAGED, NULL);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]