p->code = minor;
p->message = message;
- if (p != NULL)
+ if (next != NULL)
*next = p;
else
GSSEAP_SETSPECIFIC(gssEapStatusInfoKey, p);
return GSS_S_BAD_MECH;
}
- if (status_type != GSS_C_MECH_CODE) {
+ if (status_type != GSS_C_MECH_CODE ||
+ *message_context != 0) {
/* we rely on the mechglue for GSS_C_GSS_CODE */
*minor = 0;
return GSS_S_BAD_STATUS;