9
0
Fork 0

login: fix broken login command

It was possible to login with ctrl-c or an empty password. This bug was
introduced by the recent digest changes in common/password.c (e49a47fb).
The function check_passwd returns now also negative error codes which were
not correctly handled in do_login.

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Hubert Feurstein 2015-06-17 15:02:53 +02:00 committed by Jan Luebbe
parent 05d4d07f38
commit 9917f610da
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ static int do_login(int argc, char *argv[])
run_command(timeout_cmd);
}
if (check_passwd(passwd, passwd_len))
if (check_passwd(passwd, passwd_len) == 1)
return 0;
} while(1);