From: Matthew Newton Date: Fri, 28 Sep 2012 23:16:38 +0000 (+0100) Subject: add User-Password warning to rlm_chap X-Git-Tag: release_3_0_0_beta1~1666 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29a144e07bccaa81b2c76a04c0cb1eb7556f3c6c;p=thirdparty%2Ffreeradius-server.git add User-Password warning to rlm_chap --- diff --git a/src/modules/rlm_chap/rlm_chap.c b/src/modules/rlm_chap/rlm_chap.c index 7ac0b020e49..72c68b0b7dc 100644 --- a/src/modules/rlm_chap/rlm_chap.c +++ b/src/modules/rlm_chap/rlm_chap.c @@ -99,7 +99,16 @@ static int chap_authenticate(void *instance, REQUEST *request) request->username->vp_strvalue); if ((passwd_item = pairfind(request->config_items, PW_CLEARTEXT_PASSWORD, 0)) == NULL){ - RDEBUG("Cleartext-Password is required for authentication"); + if ((passwd_item = pairfind(request->config_items, PW_USER_PASSWORD, 0)) != NULL){ + RDEBUG("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); + RDEBUG("!!! Please update your configuration so that the \"known !!!"); + RDEBUG("!!! good\" clear text password is in Cleartext-Password, !!!"); + RDEBUG("!!! and NOT in User-Password. !!!"); + RDEBUG("!!! !!!"); + RDEBUG("!!! Authentication will fail because of this. !!!"); + RDEBUG("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); + } + RDEBUG("Cleartext-Password is required for authentication"); snprintf(module_fmsg, sizeof(module_fmsg), "rlm_chap: Clear text password not available"); module_fmsg_vp = pairmake("Module-Failure-Message",