* [PATCH] login: fix broken login command
@ 2015-06-17 13:02 Hubert Feurstein
2015-06-18 7:44 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Hubert Feurstein @ 2015-06-17 13:02 UTC (permalink / raw)
To: barebox
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>
---
commands/login.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/commands/login.c b/commands/login.c
index 210eb20..bf5085c 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);
--
2.4.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] login: fix broken login command
2015-06-17 13:02 [PATCH] login: fix broken login command Hubert Feurstein
@ 2015-06-18 7:44 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2015-06-18 7:44 UTC (permalink / raw)
To: Hubert Feurstein; +Cc: barebox
On Wed, Jun 17, 2015 at 03:02:53PM +0200, Hubert Feurstein wrote:
> 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>
> ---
> commands/login.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-18 7:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-17 13:02 [PATCH] login: fix broken login command Hubert Feurstein
2015-06-18 7:44 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox