From: Alan T. DeKok Date: Tue, 3 Aug 2021 17:24:25 +0000 (-0400) Subject: print out better errors X-Git-Tag: release_3_0_24~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3344fe948b5f28a6114cd01850d2f5975fd3daf1;p=thirdparty%2Ffreeradius-server.git print out better errors --- diff --git a/src/modules/rlm_pap/rlm_pap.c b/src/modules/rlm_pap/rlm_pap.c index 5222973d260..cc151f72990 100644 --- a/src/modules/rlm_pap/rlm_pap.c +++ b/src/modules/rlm_pap/rlm_pap.c @@ -990,7 +990,8 @@ static inline rlm_rcode_t CC_HINT(nonnull) pap_auth_pbkdf2_parse(REQUEST *reques (void)fr_strerror(); slen = fr_base64_decode((uint8_t *)&iterations, sizeof(iterations), (char const *)p, q - p); if (slen < 0) { - REDEBUG("Failed decoding PBKDF2-Password iterations component (%.*s)", (int)(q - p), p); + REDEBUG("Failed decoding PBKDF2-Password iterations component (%.*s): %s", + (int)(q - p), p, fr_strerror()); goto finish; } if (slen != sizeof(iterations)) { @@ -1015,7 +1016,7 @@ static inline rlm_rcode_t CC_HINT(nonnull) pap_auth_pbkdf2_parse(REQUEST *reques MEM(salt = talloc_array(request, uint8_t, FR_BASE64_DEC_LENGTH(((size_t)(q - p))))); slen = fr_base64_decode(salt, talloc_array_length(salt), (char const *) p, q - p); if (slen < 0) { - REDEBUG("Failed decoding PBKDF2-Password salt component"); + REDEBUG("Failed decoding PBKDF2-Password salt component: %s", fr_strerror()); goto finish; } salt_len = (size_t)slen; @@ -1029,7 +1030,7 @@ static inline rlm_rcode_t CC_HINT(nonnull) pap_auth_pbkdf2_parse(REQUEST *reques slen = fr_base64_decode(hash, sizeof(hash), (char const *)p, end - p); if (slen < 0) { - REDEBUG("Failed decoding PBKDF2-Password hash component"); + REDEBUG("Failed decoding PBKDF2-Password hash component: %s", fr_strerror()); goto finish; }