From 352639da2eb6d9ce9e36c7e93501ad95fa32a102 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Sun, 4 Apr 2010 23:47:46 +0000 Subject: [PATCH] In spnego_mech.c, revert r23225 from Luke's branch. The logic errors were fixed independently on the trunk in r23742 (#6603) and the first hunk would cause spnego_gss_init_sec_context to seg fault when passed GSS_C_NO_BUFFER as input_token. git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23860 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/spnego/spnego_mech.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/gssapi/spnego/spnego_mech.c b/src/lib/gssapi/spnego/spnego_mech.c index 74b032b68a..3e029ecd60 100644 --- a/src/lib/gssapi/spnego/spnego_mech.c +++ b/src/lib/gssapi/spnego/spnego_mech.c @@ -858,7 +858,7 @@ init_ctx_call_init(OM_uint32 *minor_status, * token back if this is the first token or if a MIC exchange * is required. */ - if (mechtok_in->length != 0 && + if (*send_token == CONT_TOKEN_SEND && mechtok_out->length == 0 && (!sc->mic_reqd || !(sc->ctx_flags & GSS_C_INTEG_FLAG))) { @@ -879,8 +879,7 @@ init_ctx_call_init(OM_uint32 *minor_status, *send_token = ERROR_TOKEN_SEND; } *negState = REJECT; - } else if (*send_token == NO_TOKEN_SEND) - *send_token = CONT_TOKEN_SEND; + } return ret; } -- 2.47.2