[gdm] Don't add localuser auth entries for XDMCP



commit 253a8b76d623f7fbbca576f046175627ccf09358
Author: Ray Strode <rstrode redhat com>
Date:   Tue Oct 13 19:22:47 2009 -0400

    Don't add localuser auth entries for XDMCP
    
    We add peer credential verified access to the X server
    for local X servers. This makes no sense for remote
    connections and will result in BadAccess, which we
    weren't trapping.
    
    This commit avoids calling XAddHosts for remote connections.
    
    This should address bug 598142 which was investigated and
    filed by Richard Evans <richard evans datanomic com>

 daemon/gdm-slave.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gdm-slave.c b/daemon/gdm-slave.c
index 516e80f..3307951 100644
--- a/daemon/gdm-slave.c
+++ b/daemon/gdm-slave.c
@@ -401,7 +401,7 @@ gdm_slave_connect_to_x11_display (GdmSlave *slave)
         if (slave->priv->server_display == NULL) {
                 g_warning ("Unable to connect to display %s", slave->priv->display_name);
                 ret = FALSE;
-        } else {
+        } else if (slave->priv->display_is_local) {
                 XHostAddress host_entries[2] = {
                         { FamilyServerInterpreted },
                         { FamilyServerInterpreted }
@@ -431,6 +431,9 @@ gdm_slave_connect_to_x11_display (GdmSlave *slave)
 
                 XAddHosts (slave->priv->server_display, host_entries,
                            G_N_ELEMENTS (host_entries));
+        } else {
+                g_debug ("GdmSlave: Connected to display %s", slave->priv->display_name);
+                ret = TRUE;
         }
 
         return ret;



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