fix failcount-double-increment bug introduced with ewindow2
authorfcusack <fcusack>
Fri, 13 Sep 2002 06:49:34 +0000 (06:49 +0000)
committerfcusack <fcusack>
Fri, 13 Sep 2002 06:49:34 +0000 (06:49 +0000)
src/modules/rlm_x99_token/x99_rlm.c

index 3487b68..55f5450 100644 (file)
@@ -760,7 +760,8 @@ sync_response:
     } /* if (card is in sync mode and sync mode allowed) */
 
     /* Both async and sync mode failed. */
-    if (x99_incr_failcount(inst->syncdir, username) != 0) {
+    if ((fc != FAIL_SOFT) /* !already incremented by x99_check_failcount() */ &&
+       (x99_incr_failcount(inst->syncdir, username) != 0)) {
        x99_log(X99_LOG_ERR,
                "auth: unable to increment failure count for user [%s]",
                username);