diff options
author | Tom Yu <tlyu@mit.edu> | 2010-05-20 21:32:47 +0000 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2010-05-20 21:32:47 +0000 |
commit | b2b972bb559c7f9df289d814bce1ba1f55eb3416 (patch) | |
tree | 4c766d2e1f6af147338c68edf70c35f8955429b4 | |
parent | ec9ecc8b867b55418126ee1667f823464e68976f (diff) | |
download | krb5-b2b972bb559c7f9df289d814bce1ba1f55eb3416.tar.gz krb5-b2b972bb559c7f9df289d814bce1ba1f55eb3416.tar.xz krb5-b2b972bb559c7f9df289d814bce1ba1f55eb3416.zip |
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.
ticket: 6726
target_version: 1.8.2
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24075 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/lib/gssapi/spnego/spnego_mech.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/gssapi/spnego/spnego_mech.c b/src/lib/gssapi/spnego/spnego_mech.c index c9cf441e0e..e82e9b5b00 100644 --- a/src/lib/gssapi/spnego/spnego_mech.c +++ b/src/lib/gssapi/spnego/spnego_mech.c @@ -3261,6 +3261,18 @@ get_negTokenResp(OM_uint32 *minor_status, *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 |