summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2017-03-31 14:52:23 -0400
committerRay Strode <rstrode@redhat.com>2017-03-31 17:22:07 -0400
commita86205badf0a0b953cdadf386999d0c0c5f6a2fb (patch)
tree8f4395a60a860e831b88f396595fe56bd801bbb9 /daemon
parentdeff5b28f8c3c27c6fe132e8e648030322b9ee77 (diff)
downloadgdm-a86205badf0a0b953cdadf386999d0c0c5f6a2fb.tar.gz
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
Diffstat (limited to 'daemon')
-rw-r--r--daemon/gdm-xdmcp-display.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/daemon/gdm-xdmcp-display.c b/daemon/gdm-xdmcp-display.c
index c9f9c3d2..630844f2 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