From: fcusack Date: Tue, 24 Oct 2006 04:40:58 +0000 (+0000) Subject: import from HEAD: X-Git-Tag: release_1_1_4~39 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;h=f8eac0d9735be5f0b8d7a13e6c984e05bc8c835c;hp=-c;p=freeradius.git import from HEAD: remove trailing "\n" from some radlog() calls --- f8eac0d9735be5f0b8d7a13e6c984e05bc8c835c diff --combined src/modules/rlm_otp/otp_pw_valid.c index ace31cc,d443000..cc90a1c --- a/src/modules/rlm_otp/otp_pw_valid.c +++ b/src/modules/rlm_otp/otp_pw_valid.c @@@ -21,11 -21,12 +21,11 @@@ * Copyright 2006 TRI-D Systems, Inc. */ -#include "ident.h" -RCSID("$Id$") +static const char rcsid[] = "$Id$"; -#include -#include -#include +#include "autoconf.h" +#include "radiusd.h" +#include "modules.h" #include "extern.h" #include "otp.h" @@@ -79,11 -80,11 +79,11 @@@ otp_pw_valid(REQUEST *request, int pwe otp_request_t otp_request; otp_reply_t otp_reply; VALUE_PAIR *cvp, *rvp; - char *username = request->username->vp_strvalue; + char *username = request->username->strvalue; int rc; if (request->username->length > OTP_MAX_USERNAME_LEN) { - (void) radlog(L_AUTH, "rlm_otp: username [%s] too long\n", username); + (void) radlog(L_AUTH, "rlm_otp: username [%s] too long", username); return RLM_MODULE_REJECT; } /* we already know challenge is short enough */ @@@ -104,61 -105,60 +104,60 @@@ switch (otp_request.pwe.pwe) { case PWE_PAP: if (rvp->length > OTP_MAX_PASSCODE_LEN) { - (void) radlog(L_AUTH, "rlm_otp: passcode for [%s] too long\n", - username); + (void) radlog(L_AUTH, "rlm_otp: passcode for [%s] too long", username); return RLM_MODULE_REJECT; } - (void) strcpy(otp_request.pwe.passcode, rvp->vp_strvalue); + (void) strcpy(otp_request.pwe.passcode, rvp->strvalue); break; case PWE_CHAP: if (cvp->length > 16) { - (void) radlog(L_AUTH, "rlm_otp: CHAP challenge for [%s] too long\n", + (void) radlog(L_AUTH, "rlm_otp: CHAP challenge for [%s] too long", username); return RLM_MODULE_INVALID; } if (rvp->length != 17) { - (void) radlog(L_AUTH, "rlm_otp: CHAP response for [%s] wrong size\n", + (void) radlog(L_AUTH, "rlm_otp: CHAP response for [%s] wrong size", username); return RLM_MODULE_INVALID; } - (void) memcpy(otp_request.pwe.challenge, cvp->vp_strvalue, cvp->length); + (void) memcpy(otp_request.pwe.challenge, cvp->strvalue, cvp->length); otp_request.pwe.clen = cvp->length; - (void) memcpy(otp_request.pwe.response, rvp->vp_strvalue, rvp->length); + (void) memcpy(otp_request.pwe.response, rvp->strvalue, rvp->length); otp_request.pwe.rlen = rvp->length; break; case PWE_MSCHAP: if (cvp->length != 8) { - (void) radlog(L_AUTH, "rlm_otp: MS-CHAP challenge for [%s] wrong size\n", + (void) radlog(L_AUTH, "rlm_otp: MS-CHAP challenge for [%s] wrong size", username); return RLM_MODULE_INVALID; } if (rvp->length != 50) { - (void) radlog(L_AUTH, "rlm_otp: MS-CHAP response for [%s] wrong size\n", + (void) radlog(L_AUTH, "rlm_otp: MS-CHAP response for [%s] wrong size", username); return RLM_MODULE_INVALID; } - (void) memcpy(otp_request.pwe.challenge, cvp->vp_strvalue, cvp->length); + (void) memcpy(otp_request.pwe.challenge, cvp->strvalue, cvp->length); otp_request.pwe.clen = cvp->length; - (void) memcpy(otp_request.pwe.response, rvp->vp_strvalue, rvp->length); + (void) memcpy(otp_request.pwe.response, rvp->strvalue, rvp->length); otp_request.pwe.rlen = rvp->length; break; case PWE_MSCHAP2: if (cvp->length != 16) { - (void) radlog(L_AUTH, "rlm_otp: MS-CHAP2 challenge for [%s] wrong size\n", + (void) radlog(L_AUTH, "rlm_otp: MS-CHAP2 challenge for [%s] wrong size", username); return RLM_MODULE_INVALID; } if (rvp->length != 50) { - (void) radlog(L_AUTH, "rlm_otp: MS-CHAP2 response for [%s] wrong size\n", + (void) radlog(L_AUTH, "rlm_otp: MS-CHAP2 response for [%s] wrong size", username); return RLM_MODULE_INVALID; } - (void) memcpy(otp_request.pwe.challenge, cvp->vp_strvalue, cvp->length); + (void) memcpy(otp_request.pwe.challenge, cvp->strvalue, cvp->length); otp_request.pwe.clen = cvp->length; - (void) memcpy(otp_request.pwe.response, rvp->vp_strvalue, rvp->length); + (void) memcpy(otp_request.pwe.response, rvp->strvalue, rvp->length); otp_request.pwe.rlen = rvp->length; break; } /* switch (otp_request.pwe.pwe) */