otp_authorize(): fix trivial State to be non-NUL, for Cisco bug
authorfcusack <fcusack>
Wed, 8 Feb 2006 21:22:10 +0000 (21:22 +0000)
committerfcusack <fcusack>
Wed, 8 Feb 2006 21:22:10 +0000 (21:22 +0000)
src/modules/rlm_otp/otp_rlm.c

index 0f82394..bfb960f 100644 (file)
@@ -394,7 +394,8 @@ gen_challenge:
     }
   } else {
     state = rad_malloc(5);
-    (void) sprintf(state, "0x00");
+    /* a non-NUL byte, so that Cisco (see otp_gen_state()) returns it */
+    (void) sprintf(state, "0x01");
   }
   pairadd(&request->reply->vps, pairmake("State", state, T_OP_EQ));
   free(state);