diff options
author | George Lebl <jirka@5z.com> | 2003-08-04 22:10:19 +0000 |
---|---|---|
committer | George Lebl <jirka@src.gnome.org> | 2003-08-04 22:10:19 +0000 |
commit | fecbe1393d8d9ef20999db9feaad57394cdba06f (patch) | |
tree | e7a974668beae033c87994c38d054e4f64999e6c | |
parent | 0ae85eb25386c471ef643b50dc9952cd8cec911c (diff) | |
download | gdm-fecbe1393d8d9ef20999db9feaad57394cdba06f.tar.gz |
fix checking auth string
Mon Aug 04 15:06:09 2003 George Lebl <jirka@5z.com>
* daemon/xdmcp.c: fix checking auth string
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | daemon/xdmcp.c | 5 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,7 @@ +Mon Aug 04 15:06:09 2003 George Lebl <jirka@5z.com> + + * daemon/xdmcp.c: fix checking auth string + Mon Aug 04 14:28:54 2003 George Lebl <jirka@5z.com> * daemon/choose.c: fix crash when indirect display expires diff --git a/daemon/xdmcp.c b/daemon/xdmcp.c index 18ca82b7..a427b926 100644 --- a/daemon/xdmcp.c +++ b/daemon/xdmcp.c @@ -1012,7 +1012,8 @@ gdm_xdmcp_handle_request (struct sockaddr_in *clnt_sa, gint len) /* libXdmcp doesn't terminate strings properly so we cheat and use strncmp() */ for (i = 0 ; i < clnt_authorization.length ; i++) - if (! strncmp (clnt_authorization.data[i].data, "MIT-MAGIC-COOKIE-1", 18)) + if (clnt_authorization.data[i].length == 18 && + strncmp (clnt_authorization.data[i].data, "MIT-MAGIC-COOKIE-1", 18) == 0) mitauth = TRUE; /* Manufacturer ID */ @@ -1355,7 +1356,7 @@ gdm_xdmcp_handle_got_managed_forward (struct sockaddr_in *clnt_sa, gint len) ARRAY8 clnt_address; gdm_debug ("gdm_xdmcp_handle_got_managed_forward: " - "Got MANAGED_FORWARD from %s", + "Got GOT_MANAGED_FORWARD from %s", inet_ntoa (clnt_sa->sin_addr)); /* Hostname */ |