summaryrefslogtreecommitdiff
path: root/loginutils/passwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'loginutils/passwd.c')
-rw-r--r--loginutils/passwd.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/loginutils/passwd.c b/loginutils/passwd.c
index 5d8380d..b60b897 100644
--- a/loginutils/passwd.c
+++ b/loginutils/passwd.c
@@ -323,7 +323,6 @@ static int new_password(const struct passwd *pw, int amroot, int algo)
char *cp;
char orig[200];
char pass[200];
- time_t start, now;
if (!amroot && crypt_passwd[0]) {
if (!(clear = bb_askpass(0, "Old password:"))) {
@@ -334,12 +333,7 @@ static int new_password(const struct passwd *pw, int amroot, int algo)
if (strcmp(cipher, crypt_passwd) != 0) {
syslog(LOG_WARNING, "incorrect password for `%s'",
pw->pw_name);
- time(&start);
- now = start;
- while (difftime(now, start) < FAIL_DELAY) {
- sleep(FAIL_DELAY);
- time(&now);
- }
+ bb_do_delay(FAIL_DELAY);
fprintf(stderr, "Incorrect password.\n");
/* return -1; */
return 1;