From c2bc1d4b03e099282b3248f5d35492b9d01d9db5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Mon, 18 Feb 2008 18:19:51 +0000 Subject: [PATCH] (spnego_reply): if the reply token was of length 0, make it the same as no token. Pointed out by Zeqing Xia. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22598 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/gssapi/spnego/init_sec_context.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/gssapi/spnego/init_sec_context.c b/lib/gssapi/spnego/init_sec_context.c index 6ed52420d..6c8c8b36e 100644 --- a/lib/gssapi/spnego/init_sec_context.c +++ b/lib/gssapi/spnego/init_sec_context.c @@ -480,7 +480,8 @@ spnego_reply return GSS_S_BAD_MECH; } - if (resp.responseToken != NULL || + /* if a token (of non zero length), or no context, pass to underlaying mech */ + if ((resp.responseToken != NULL && resp.responseToken->length) || ctx->negotiated_ctx_id == GSS_C_NO_CONTEXT) { gss_buffer_desc mech_input_token;