]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add User-Password warning to rlm_chap
authorMatthew Newton <mcn4@leicester.ac.uk>
Fri, 28 Sep 2012 23:16:38 +0000 (00:16 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 29 Sep 2012 05:06:28 +0000 (07:06 +0200)
src/modules/rlm_chap/rlm_chap.c

index 7ac0b020e494e97be7a0d66f7909fc9a5377f8a9..72c68b0b7dc20a7d7a1608f4d6a108b4df7956f1 100644 (file)
@@ -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",