]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Clarify error messages
authorAlan T. DeKok <aland@freeradius.org>
Wed, 13 Jun 2012 08:41:51 +0000 (10:41 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 15 Jul 2012 17:09:47 +0000 (13:09 -0400)
src/modules/rlm_mschap/rlm_mschap.c

index 918befe44db4248257ee9dd233ce0152dd959c76..065b25466c92356b7d05a193222107cf5c43962e 100644 (file)
@@ -1116,11 +1116,11 @@ static int mschap_authenticate(void * instance, REQUEST *request)
                 *      response
                 */
                if (response->vp_octets[1] & 0x01) {
-                       RDEBUG2("Told to do MS-CHAPv1 with NT-Password");
+                       RDEBUG2("Client is using MS-CHAPv1 with NT-Password");
                        password = nt_password;
                        offset = 26;
                } else {
-                       RDEBUG2("Told to do MS-CHAPv1 with LM-Password");
+                       RDEBUG2("Client is using MS-CHAPv1 with LM-Password");
                        password = lm_password;
                        offset = 2;
                }
@@ -1234,7 +1234,7 @@ static int mschap_authenticate(void * instance, REQUEST *request)
                               username_string, /* user name */
                               mschapv1_challenge); /* resulting challenge */
 
-               RDEBUG2("Told to do MS-CHAPv2 for %s with NT-Password",
+               RDEBUG2("Client is using MS-CHAPv2 for %s, we need NT-Password",
                       username_string);
 
                if (do_mschap(inst, request, nt_password, mschapv1_challenge,
@@ -1256,7 +1256,7 @@ static int mschap_authenticate(void * instance, REQUEST *request)
                                                 sizeof(buffer) - 12 - i*2, "%02x",
                                                 fr_rand() & 0xff);
                                }
-                               snprintf(buffer + 12 + 32, sizeof(buffer) - 45,
+                               snprintf(buffer + 45, sizeof(buffer) - 45,
                                         " V=3 M=%s", inst->retry_msg);
                        }
                        mschap_add_reply(request, &request->reply->vps,