char *passwd_file;
char *xlat_name;
char *ntlm_auth;
+ char *auth_type;
} rlm_mschap_t;
xlat_register(xlat_name, mschap_xlat, inst);
}
+ /*
+ * For backwards compatibility
+ */
+ if (!dict_valbyname(PW_AUTH_TYPE, inst->xlat_name)) {
+ inst->auth_type = "MS-CHAP";
+ }
+
return 0;
}
* will take care of turning clear-text passwords into
* NT/LM passwords.
*/
- vp = pairmake("Auth-Type", inst->xlat_name, T_OP_EQ);
- rad_assert(vp != NULL);
+ vp = pairmake("Auth-Type", inst->auth_type, T_OP_EQ);
+ if (!vp) return RLM_MODULE_FAIL;
pairmove(&request->config_items, &vp);
pairfree(&vp); /* may be NULL */