summaryrefslogtreecommitdiff
path: root/daemon/gdm-xdmcp-display-factory.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2009-03-16 20:15:55 +0000
committerRay Strode <halfline@src.gnome.org>2009-03-16 20:15:55 +0000
commit5e464319bdccf9a9c68496d31592ccf7766ce1a3 (patch)
treec69cebc9c3c81fb720d64a706c1e9302f683e58e /daemon/gdm-xdmcp-display-factory.c
parent8a3490706e1a85d8607a117a0387e83764dfc9db (diff)
downloadgdm-5e464319bdccf9a9c68496d31592ccf7766ce1a3.tar.gz
Fix the GetX11Cookie dbus method Send the cookie as a byte array instead
2009-03-16 Ray Strode <rstrode@redhat.com> Fix the GetX11Cookie dbus method * daemon/gdm-display.xml: Send the cookie as a byte array instead of utf-8 string * daemon/gdm-display.[ch] (gdm_display_get_x11_cookie): pass in a GArray instead of the more natural char array and size pointers to make dbus-glib happy. * daemon/gdm-xdmcp-display-factory.c (gdm_xdmcp_handle_request): Update to use new get_x11_cookie signature. svn path=/trunk/; revision=6781
Diffstat (limited to 'daemon/gdm-xdmcp-display-factory.c')
-rw-r--r--daemon/gdm-xdmcp-display-factory.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/daemon/gdm-xdmcp-display-factory.c b/daemon/gdm-xdmcp-display-factory.c
index 05d0261b..724717ce 100644
--- a/daemon/gdm-xdmcp-display-factory.c
+++ b/daemon/gdm-xdmcp-display-factory.c
@@ -2281,19 +2281,17 @@ gdm_xdmcp_handle_request (GdmXdmcpDisplayFactory *factory,
ARRAY8 authorization_name;
ARRAY8 authorization_data;
gint32 session_number;
- char *cookie;
- gsize cookie_size;
+ GArray *cookie;
char *name;
- gdm_display_get_x11_cookie (display, &cookie,
- &cookie_size, NULL);
+ gdm_display_get_x11_cookie (display, &cookie, NULL);
gdm_display_get_x11_display_name (display, &name, NULL);
g_debug ("GdmXdmcpDisplayFactory: Sending authorization key for display %s", name);
g_free (name);
- g_debug ("GdmXdmcpDisplayFactory: cookie len %d", (int) cookie_size);
+ g_debug ("GdmXdmcpDisplayFactory: cookie len %d", (int) cookie->len);
session_number = gdm_xdmcp_display_get_session_number (GDM_XDMCP_DISPLAY (display));
@@ -2308,8 +2306,10 @@ 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;
- authorization_data.length = cookie_size;
+ authorization_data.data = (CARD8 *) cookie->data;
+ authorization_data.length = cookie->len;
+
+ g_array_free (cookie, TRUE);
/* the addrs are NOT copied */
gdm_xdmcp_send_accept (factory,