import from HEAD:
authorfcusack <fcusack>
Fri, 25 May 2007 00:45:23 +0000 (00:45 +0000)
committerfcusack <fcusack>
Fri, 25 May 2007 00:45:23 +0000 (00:45 +0000)
handle OTP_RC_IPIN error from otpd-2.2.1+

src/modules/rlm_otp/otp.h
src/modules/rlm_otp/otp_pw_valid.c

index 3240d1a..86b49a7 100644 (file)
@@ -45,6 +45,7 @@ RCSIDH(otp_h, "$Id$")
 #define OTP_RC_MAXTRIES                4
 #define OTP_RC_SERVICE_ERR     5
 #define OTP_RC_NEXT_PASSCODE   6
+#define OTP_RC_IPIN            7
 
 #define OTP_MAX_USERNAME_LEN           31
 /* only needs to be MAX_PIN_LEN (16) + MAX_RESPONSE_LEN (16) */
index 574afd4..6ce6713 100644 (file)
@@ -53,6 +53,7 @@ otprc2rlmrc(int rc)
     case OTP_RC_AUTH_ERR:              return RLM_MODULE_REJECT;
     case OTP_RC_MAXTRIES:              return RLM_MODULE_USERLOCK;
     case OTP_RC_NEXTPASSCODE:          return RLM_MODULE_USERLOCK;
+    case OTP_RC_IPIN:                  return RLM_MODULE_REJECT;
     case OTP_RC_SERVICE_ERR:           return RLM_MODULE_FAIL;
     default:                           return RLM_MODULE_FAIL;
   }