return true;
}
-static bool is_mech_allowed(gss_OID_set allowed_mechs, gss_const_OID mech)
+static bool is_mech_allowed(gss_OID_set allowed_mechs, gss_const_OID mech,
+ bool multi_step_supported)
{
+ if (!multi_step_supported && gss_oid_equal(&gss_mech_ntlmssp, mech))
+ return false;
+
if (allowed_mechs == GSS_C_NO_OID_SET) return true;
for (int i = 0; i < allowed_mechs->count; i++) {
break;
case AUTH_TYPE_RAW_NTLM:
- if (!is_mech_allowed(desired_mechs, &gss_mech_ntlmssp)) {
+ if (!is_mech_allowed(desired_mechs, &gss_mech_ntlmssp,
+ cfg->gss_conn_ctx)) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, req,
"NTLM Authentication is not allowed!");
goto done;
}
} else if (ret == HTTP_UNAUTHORIZED) {
apr_table_add(req->err_headers_out, "WWW-Authenticate", "Negotiate");
- if (is_mech_allowed(desired_mechs, &gss_mech_ntlmssp)) {
+ if (is_mech_allowed(desired_mechs, &gss_mech_ntlmssp,
+ cfg->gss_conn_ctx)) {
apr_table_add(req->err_headers_out, "WWW-Authenticate", "NTLM");
}
if (cfg->use_basic_auth) {