Regularize error messages
authorAlan T. DeKok <aland@freeradius.org>
Fri, 6 Aug 2010 15:24:54 +0000 (17:24 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 7 Aug 2010 07:46:24 +0000 (09:46 +0200)
src/modules/rlm_chap/rlm_chap.c

index e0f3bc9..6c5f08b 100644 (file)
@@ -78,17 +78,17 @@ static int chap_authenticate(void *instance, REQUEST *request)
 
        chap = pairfind(request->packet->vps, PW_CHAP_PASSWORD, 0);
        if (!chap) {
-               radlog_request(L_AUTH, 0, request, "rlm_chap: Attribute \"CHAP-Password\" is required for authentication.");
+               RDEBUG("ERROR: You set 'Auth-Type = CHAP' for a request that does not contain a CHAP-Password attribute!");
                return RLM_MODULE_INVALID;
        }
 
        if (chap->length == 0) {
-               radlog_request(L_ERR, 0, request, "rlm_chap: empty password supplied");
+               RDEBUG("ERROR: CHAP-Password is empty");
                return RLM_MODULE_INVALID;
        }
 
        if (chap->length != CHAP_VALUE_LENGTH + 1) {
-               radlog_request(L_ERR, 0, request, "rlm_chap: password supplied has wrong length");
+               RDEBUG("ERROR: CHAP-Password has invalid length");
                return RLM_MODULE_INVALID;
        }