import from HEAD:
authorfcusack <fcusack>
Tue, 24 Oct 2006 04:45:13 +0000 (04:45 +0000)
committerfcusack <fcusack>
Tue, 24 Oct 2006 04:45:13 +0000 (04:45 +0000)
s/bad state/bad radstate/ to be clear that it's not token state

1  2 
src/modules/rlm_otp/otp_rlm.c

@@@ -342,10 -343,10 +342,10 @@@ otp_authenticate(void *instance, REQUES
       */
  
      /* ASCII decode; this is why OTP_MAX_RADSTATE_LEN has +1 */
 -    (void) memcpy(rad_state, vp->vp_strvalue, vp->length);
 +    (void) memcpy(rad_state, vp->strvalue, vp->length);
      rad_state[e_length] = '\0';
      if (otp_a2x(rad_state, raw_state) == -1) {
-       (void) radlog(L_AUTH, "rlm_otp: %s: bad state for [%s]: not hex",
+       (void) radlog(L_AUTH, "rlm_otp: %s: bad radstate for [%s]: not hex",
                      __func__, username);
        return RLM_MODULE_INVALID;
      }
        return RLM_MODULE_FAIL;
      }
      /* compare generated state against returned state to verify hmac */
 -    if (memcmp(state, vp->vp_strvalue, vp->length)) {
 +    if (memcmp(state, vp->strvalue, vp->length)) {
-       (void) radlog(L_AUTH, "rlm_otp: %s: bad state for [%s]: hmac",
+       (void) radlog(L_AUTH, "rlm_otp: %s: bad radstate for [%s]: hmac",
                      __func__, username);
        return RLM_MODULE_REJECT;
      }