]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
In spnego_mech.c, revert r23225 from Luke's branch. The logic errors
authorGreg Hudson <ghudson@mit.edu>
Sun, 4 Apr 2010 23:47:46 +0000 (23:47 +0000)
committerGreg Hudson <ghudson@mit.edu>
Sun, 4 Apr 2010 23:47:46 +0000 (23:47 +0000)
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

index 74b032b68a2f7fa0c09a08edfd56f556581511de..3e029ecd60c6288f73e76141e0d892a403aba2d8 100644 (file)
@@ -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;
 }