svn rev #24075: trunk/src/lib/gssapi/spnego/

tlyu@MIT.EDU tlyu at MIT.EDU
Thu May 20 17:32:47 EDT 2010


http://src.mit.edu/fisheye/changelog/krb5/?cs=24075
Commit By: tlyu
Log Message:
ticket: 6726
target_version: 1.8.2
tags: pullup

Apply patch from Arlene Berry to detect and ignore a duplicate
mechanism token sent in the mechListMIC field, such as sent by Windows
2000 Server.


Changed Files:
U   trunk/src/lib/gssapi/spnego/spnego_mech.c
Modified: trunk/src/lib/gssapi/spnego/spnego_mech.c
===================================================================
--- trunk/src/lib/gssapi/spnego/spnego_mech.c	2010-05-20 20:42:26 UTC (rev 24074)
+++ trunk/src/lib/gssapi/spnego/spnego_mech.c	2010-05-20 21:32:47 UTC (rev 24075)
@@ -3261,6 +3261,18 @@
 		*mechListMIC = get_input_token(&ptr, REMAIN);
 		if (*mechListMIC == GSS_C_NO_BUFFER)
 			return GSS_S_DEFECTIVE_TOKEN;
+
+                /* Handle Windows 2000 duplicate response token */
+                if (*responseToken &&
+                    ((*responseToken)->length == (*mechListMIC)->length) &&
+                    !memcmp((*responseToken)->value, (*mechListMIC)->value,
+                            (*responseToken)->length)) {
+			OM_uint32 tmpmin;
+
+			gss_release_buffer(&tmpmin, *mechListMIC);
+			free(*mechListMIC);
+			*mechListMIC = NULL;
+		}
 	}
 	return GSS_S_COMPLETE;
 #undef REMAIN




More information about the cvs-krb5 mailing list