- if (mc && mc->established) {
- if (mag_basic_check(cfg, mc, ba_user, ba_pwd)) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, req,
- "Already established BASIC AUTH context found!");
- mag_set_req_data(req, cfg, mc);
- ret = OK;
- goto done;
- } else {
- mag_conn_clear(mc);
- }
+ if (mc && mc->established &&
+ mag_basic_check(cfg, mc, ba_user, ba_pwd)) {
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, req,
+ "Already established BASIC AUTH context found!");
+ mag_set_req_data(req, cfg, mc);
+ ret = OK;
+ goto done;
+ }
+
+ break;
+
+ case AUTH_TYPE_RAW_NTLM:
+ if (!is_mech_allowed(cfg, &gss_mech_ntlmssp)) {
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, req,
+ "NTLM Authentication is not allowed!");
+ goto done;
+ }
+
+ if (!parse_auth_header(req->pool, &auth_header, &input)) {
+ goto done;