diff options
author | Hubert Feurstein <h.feurstein@gmail.com> | 2015-06-17 15:02:53 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-06-18 09:44:37 +0200 |
commit | cd09bf8f515c014fcceffaf2aeb8ed434dd527f2 (patch) | |
tree | 857c9145a0eff28f6398b97fb13d9a7c20f2e6b6 | |
parent | 0542ec647ee146d2e81605396cba8b365a9e2710 (diff) | |
download | barebox-cd09bf8f515c014fcceffaf2aeb8ed434dd527f2.tar.gz barebox-cd09bf8f515c014fcceffaf2aeb8ed434dd527f2.tar.xz |
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>
-rw-r--r-- | commands/login.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/login.c b/commands/login.c index 210eb203ac..bf5085c854 100644 --- a/commands/login.c +++ b/commands/login.c @@ -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); |