]> granicus.if.org Git - sudo/commitdiff
make PASSWORD_NOT_CORRECT logging consistent with other modules
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 7 Jul 1999 18:08:22 +0000 (18:08 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 7 Jul 1999 18:08:22 +0000 (18:08 +0000)
check_sia.c

index 8a389fdb13701bc38833ebd428789a1b1faf4fd7..ebf607e4cd1d8ab5b11a9c3048887731c8fcca97 100644 (file)
@@ -125,18 +125,13 @@ sia_attempt_auth()
            return;
        }
 
-       --counter;
+       --counter;              /* otherwise, try again  */
        pass_warn(stderr);
     }
     set_perms(PERM_USER, 0);
 
-    if (counter > 0) {
-       log_error(PASSWORD_NOT_CORRECT);
-       inform_user(PASSWORD_NOT_CORRECT);
-    } else {
-       log_error(PASSWORDS_NOT_CORRECT);
-       inform_user(PASSWORDS_NOT_CORRECT);
-    }
+    log_error(counter ? PASSWORD_NOT_CORRECT : PASSWORDS_NOT_CORRECT);
+    inform_user(counter ? PASSWORD_NOT_CORRECT : PASSWORDS_NOT_CORRECT);
     exit(1);
 }