import from HEAD:
authorfcusack <fcusack>
Wed, 23 May 2007 21:20:00 +0000 (21:20 +0000)
committerfcusack <fcusack>
Wed, 23 May 2007 21:20:00 +0000 (21:20 +0000)
update otp_request_t to v2

1  2 
src/modules/rlm_otp/otp_pw_valid.c

   * Copyright 2006 TRI-D Systems, Inc.
   */
  
- #include "ident.h"
+ #include <freeradius-devel/ident.h>
  RCSID("$Id$")
  
 -#include <freeradius-devel/radiusd.h>
 -#include <freeradius-devel/modules.h>
 +#include "autoconf.h"
- #include "radiusd.h"
++#include "radiusd.h
 +#include "modules.h"
  
  #include "extern.h"
  #include "otp.h"
@@@ -109,7 -106,7 +111,7 @@@ otp_pw_valid(REQUEST *request, int pwe
        (void) radlog(L_AUTH, "rlm_otp: passcode for [%s] too long", username);
        return RLM_MODULE_REJECT;
      }
-     (void) strcpy(otp_request.pwe.passcode, rvp->strvalue);
 -    (void) strcpy(otp_request.pwe.u.pap.passcode, rvp->vp_strvalue);
++    (void) strcpy(otp_request.pwe.u.pap.passcode, rvp->strvalue);
      break;
  
    case PWE_CHAP:
                      username);
        return RLM_MODULE_INVALID;
      }
-     (void) memcpy(otp_request.pwe.challenge, cvp->strvalue, cvp->length);
-     otp_request.pwe.clen = cvp->length;
-     (void) memcpy(otp_request.pwe.response, rvp->strvalue, rvp->length);
-     otp_request.pwe.rlen = rvp->length;
 -    (void) memcpy(otp_request.pwe.u.chap.challenge, cvp->vp_strvalue,
++    (void) memcpy(otp_request.pwe.u.chap.challenge, cvp->strvalue,
+                   cvp->length);
+     otp_request.pwe.u.chap.clen = cvp->length;
 -    (void) memcpy(otp_request.pwe.u.chap.response, rvp->vp_strvalue,
++    (void) memcpy(otp_request.pwe.u.chap.response, rvp->strvalue,
+                   rvp->length);
+     otp_request.pwe.u.chap.rlen = rvp->length;
      break;
  
    case PWE_MSCHAP:
                      username);
        return RLM_MODULE_INVALID;
      }
-     (void) memcpy(otp_request.pwe.challenge, cvp->strvalue, cvp->length);
-     otp_request.pwe.clen = cvp->length;
-     (void) memcpy(otp_request.pwe.response, rvp->strvalue, rvp->length);
-     otp_request.pwe.rlen = rvp->length;
 -    (void) memcpy(otp_request.pwe.u.chap.challenge, cvp->vp_strvalue,
++    (void) memcpy(otp_request.pwe.u.chap.challenge, cvp->strvalue,
+                   cvp->length);
+     otp_request.pwe.u.chap.clen = cvp->length;
 -    (void) memcpy(otp_request.pwe.u.chap.response, rvp->vp_strvalue,
++    (void) memcpy(otp_request.pwe.u.chap.response, rvp->strvalue,
+                   rvp->length);
+     otp_request.pwe.u.chap.rlen = rvp->length;
      break;
  
    case PWE_MSCHAP2:
                      username);
        return RLM_MODULE_INVALID;
      }
-     (void) memcpy(otp_request.pwe.challenge, cvp->strvalue, cvp->length);
-     otp_request.pwe.clen = cvp->length;
-     (void) memcpy(otp_request.pwe.response, rvp->strvalue, rvp->length);
-     otp_request.pwe.rlen = rvp->length;
 -    (void) memcpy(otp_request.pwe.u.chap.challenge, cvp->vp_strvalue,
++    (void) memcpy(otp_request.pwe.u.chap.challenge, cvp->strvalue,
+                   cvp->length);
+     otp_request.pwe.u.chap.clen = cvp->length;
 -    (void) memcpy(otp_request.pwe.u.chap.response, rvp->vp_strvalue,
++    (void) memcpy(otp_request.pwe.u.chap.response, rvp->strvalue,
+                   rvp->length);
+     otp_request.pwe.u.chap.rlen = rvp->length;
      break;
    } /* switch (otp_request.pwe.pwe) */