[28108] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Fix SPNEGO one-hop interop against old IIS

daemon@ATHENA.MIT.EDU (Greg Hudson)
Thu Dec 12 11:02:51 2013

Date: Thu, 12 Dec 2013 11:02:46 -0500
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201312121602.rBCG2kqf025204@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/37af638b742dbd642eb70092e4f7781c3f69d86d
commit 37af638b742dbd642eb70092e4f7781c3f69d86d
Author: Greg Hudson <ghudson@mit.edu>
Date:   Tue Dec 10 12:04:18 2013 -0500

    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]
    
    ticket: 7797 (new)
    target_version: 1.12.1
    tags: pullup

 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 3937662..d82934b 100644
--- a/src/lib/gssapi/spnego/spnego_mech.c
+++ b/src/lib/gssapi/spnego/spnego_mech.c
@@ -760,6 +760,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;
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post