From 7875261fdc2b69db3ef0a9ded37beceafb70c692 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Fri, 6 Aug 2010 17:48:44 +0200 Subject: [PATCH] Regularize warning messages --- src/modules/rlm_pap/rlm_pap.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/modules/rlm_pap/rlm_pap.c b/src/modules/rlm_pap/rlm_pap.c index 2088df2..e1b0e22 100644 --- a/src/modules/rlm_pap/rlm_pap.c +++ b/src/modules/rlm_pap/rlm_pap.c @@ -468,7 +468,7 @@ static int pap_authorize(void *instance, REQUEST *request) * Don't touch existing Auth-Types. */ if (auth_type) { - RDEBUG2("Found existing Auth-Type, not changing it."); + RDEBUG2("WARNING: Auth-Type already set. Not setting to PAP"); return RLM_MODULE_NOOP; } @@ -515,16 +515,9 @@ static int pap_authenticate(void *instance, REQUEST *request) char buff2[MAX_STRING_LEN + 50]; int scheme = PAP_ENC_INVALID; - if (!request->password){ - radlog_request(L_AUTH, 0, request, "Attribute \"Password\" is required for authentication."); - return RLM_MODULE_INVALID; - } - - /* - * Clear-text passwords are the only ones we support. - */ - if (request->password->attribute != PW_USER_PASSWORD) { - radlog_request(L_AUTH, 0, request, "Attribute \"User-Password\" is required for authentication. Cannot use \"%s\".", request->password->name); + if (!request->password || + (request->password->attribute != PW_USER_PASSWORD)) { + RDEBUG("ERROR: You set 'Auth-Type = PAP' for a request that does not contain a User-Password attribute!"); return RLM_MODULE_INVALID; } -- 2.1.4