diff options
author | Greg Hudson <ghudson@mit.edu> | 2013-12-10 12:04:18 -0500 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2014-01-22 22:21:10 -0500 |
commit | e36d043094fe214c5519244ea93112ca5331e007 (patch) | |
tree | b3eb4a13910ea9e6041049eda62590a502979cb1 /src | |
parent | c9eaac15a27a61df98b063d0a8432422a9b96f24 (diff) | |
download | krb5-e36d043094fe214c5519244ea93112ca5331e007.zip krb5-e36d043094fe214c5519244ea93112ca5331e007.tar.gz krb5-e36d043094fe214c5519244ea93112ca5331e007.tar.bz2 |
Fix SPNEGO one-hop interop against old IIS
IIS 6.0 and similar return a zero length reponse buffer in the last
SPNEGO packet when context initiation is performed without mutual
authentication. In this case the underlying Kerberos mechanism has
already completed successfully on the first invocation, and SPNEGO
does not expect a mech response token in the answer. If we get an
empty mech response token when the mech is complete during
negotiation, ignore it.
[ghudson@mit.edu: small code style and commit message changes]
(cherry picked from commit 37af638b742dbd642eb70092e4f7781c3f69d86d)
ticket: 7842 (new)
version_fixed: 1.10.8
status: resolved
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/gssapi/spnego/spnego_mech.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/gssapi/spnego/spnego_mech.c b/src/lib/gssapi/spnego/spnego_mech.c index fe93140..f26db63 100644 --- a/src/lib/gssapi/spnego/spnego_mech.c +++ b/src/lib/gssapi/spnego/spnego_mech.c @@ -749,6 +749,12 @@ init_ctx_nego(OM_uint32 *minor_status, spnego_gss_ctx_id_t sc, map_errcode(minor_status); ret = GSS_S_DEFECTIVE_TOKEN; } + } else if ((*responseToken)->length == 0 && sc->mech_complete) { + /* Handle old IIS servers returning empty token instead of + * null tokens in the non-mutual auth case. */ + *negState = ACCEPT_COMPLETE; + *tokflag = NO_TOKEN_SEND; + ret = GSS_S_COMPLETE; } else if (sc->mech_complete) { /* Reject spurious mech token. */ ret = GSS_S_DEFECTIVE_TOKEN; |