From 970e8110b86b93b83431fd17bf9a5c4d017e0972 Mon Sep 17 00:00:00 2001 From: Arran Cudbard-Bell Date: Fri, 13 Jun 2014 16:37:24 +0100 Subject: [PATCH] Better debug output from rlm_mschap --- src/modules/rlm_mschap/rlm_mschap.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/modules/rlm_mschap/rlm_mschap.c b/src/modules/rlm_mschap/rlm_mschap.c index cc3e87a..c44c0dd 100644 --- a/src/modules/rlm_mschap/rlm_mschap.c +++ b/src/modules/rlm_mschap/rlm_mschap.c @@ -1102,17 +1102,18 @@ static int CC_HINT(nonnull (1, 2, 4, 5 ,6)) do_mschap(rlm_mschap_t *inst, REQUES * NT_KEY: 000102030405060708090a0b0c0d0e0f */ if (memcmp(buffer, "NT_KEY: ", 8) != 0) { - REDEBUG("Invalid output from ntlm_auth: expecting NT_KEY"); + REDEBUG("Invalid output from ntlm_auth: expecting 'NT_KEY: ' prefix"); return -1; } /* - * Check the length. It should be at least 32, - * with an LF at the end. + * Check the length. It should be at least 32, with an LF at the end. */ len = strlen(buffer + 8); if (len < 32) { - REDEBUG2("Invalid output from ntlm_auth: NT_KEY has unexpected length"); + REDEBUG2("Invalid output from ntlm_auth: NT_KEY too short, expected 32 bytes got %zu bytes", + len); + return -1; } -- 2.1.4