554204c
Upstream change #22099, triggered by report from Marcus Granado, fix by Tom Yu.
554204c
In a nutshell, when return_token is neither NO_TOKEN_SEND nor CHECK_MIC, we
554204c
might still not want a reply token, for example if it's ERROR_TOKEN_SEND.
554204c
diff -up src/lib/gssapi/spnego/spnego_mech.c src/lib/gssapi/spnego/spnego_mech.c
554204c
--- src/lib/gssapi/spnego/spnego_mech.c	2009-03-17 16:47:10.000000000 -0400
554204c
+++ src/lib/gssapi/spnego/spnego_mech.c	2009-03-17 16:47:14.000000000 -0400
554204c
@@ -1248,7 +1248,8 @@ spnego_gss_accept_sec_context(void *ct,
554204c
 				 &negState, &return_token);
554204c
 	}
554204c
 cleanup:
554204c
-	if (return_token != NO_TOKEN_SEND && return_token != CHECK_MIC) {
554204c
+	if (return_token == INIT_TOKEN_SEND ||
554204c
+	    return_token == CONT_TOKEN_SEND) {
554204c
 		tmpret = make_spnego_tokenTarg_msg(negState, sc->internal_mech,
554204c
 						   &mechtok_out, mic_out,
554204c
 						   return_token,