summaryrefslogtreecommitdiff
path: root/daemon/gdm-xdmcp-display-factory.c
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-02-25 12:32:21 -0500
committerRay Strode <rstrode@redhat.com>2014-03-17 16:32:17 -0400
commitd7aa7246d7c6d2bc13bc513c29f3e7ce2a0ff2cc (patch)
tree31769ab3e3466df6feb558b1a90963d7b3c5779e /daemon/gdm-xdmcp-display-factory.c
parent236102c0e17a1b13328dd86f60cc0495ebd3d03b (diff)
downloadgdm-d7aa7246d7c6d2bc13bc513c29f3e7ce2a0ff2cc.tar.gz
Integrate the slaves into the main daemon process
For no particular reason, the slave has been kept as a separate process. Integrate this into the main display process by simply making the display keep a handle to a GdmSlave object. To keep the cleanup simple, we won't remove the GdmSlave subtypes yet. A future cleanup should merge the slave functionality into GdmDisplay and its subtypes. https://bugzilla.gnome.org/show_bug.cgi?id=726380
Diffstat (limited to 'daemon/gdm-xdmcp-display-factory.c')
-rw-r--r--daemon/gdm-xdmcp-display-factory.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/daemon/gdm-xdmcp-display-factory.c b/daemon/gdm-xdmcp-display-factory.c
index 28b03007..7fb26d6a 100644
--- a/daemon/gdm-xdmcp-display-factory.c
+++ b/daemon/gdm-xdmcp-display-factory.c
@@ -2363,11 +2363,13 @@ gdm_xdmcp_handle_request (GdmXdmcpDisplayFactory *factory,
ARRAY8 authorization_name;
ARRAY8 authorization_data;
gint32 session_number;
- GArray *cookie;
+ const char *x11_cookie;
+ gsize x11_cookie_size;
char *name;
- cookie = NULL;
- gdm_display_get_x11_cookie (display, &cookie, NULL);
+ x11_cookie = NULL;
+ x11_cookie_size = 0;
+ gdm_display_get_x11_cookie (display, &x11_cookie, &x11_cookie_size, NULL);
name = NULL;
gdm_display_get_x11_display_name (display, &name, NULL);
@@ -2375,12 +2377,12 @@ gdm_xdmcp_handle_request (GdmXdmcpDisplayFactory *factory,
g_debug ("GdmXdmcpDisplayFactory: Sending authorization key for display %s", name ? name : "(null)");
g_free (name);
- g_debug ("GdmXdmcpDisplayFactory: cookie len %d", (int) cookie->len);
+ g_debug ("GdmXdmcpDisplayFactory: cookie len %d", (int) x11_cookie_size);
session_number = gdm_xdmcp_display_get_session_number (GDM_XDMCP_DISPLAY (display));
/* the send accept will fail if cookie is null */
- g_assert (cookie != NULL);
+ g_assert (x11_cookie != NULL);
authentication_name.data = NULL;
authentication_name.length = 0;
@@ -2390,8 +2392,8 @@ gdm_xdmcp_handle_request (GdmXdmcpDisplayFactory *factory,
authorization_name.data = (CARD8 *) "MIT-MAGIC-COOKIE-1";
authorization_name.length = strlen ((char *) authorization_name.data);
- authorization_data.data = (CARD8 *) cookie->data;
- authorization_data.length = cookie->len;
+ authorization_data.data = (CARD8 *) x11_cookie;
+ authorization_data.length = x11_cookie_size;
/* the addrs are NOT copied */
gdm_xdmcp_send_accept (factory,
@@ -2401,8 +2403,6 @@ gdm_xdmcp_handle_request (GdmXdmcpDisplayFactory *factory,
&authentication_data,
&authorization_name,
&authorization_data);
-
- g_array_free (cookie, TRUE);
}
}
} else {