Skip to contentSkip to conversation

login: fix broken login command

PATCH Applied Hubert Feurstein 2 participants 2 messages Jun 17, 2015 – Jun 18, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 commands/login.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
commands/login.c +1 -1
index 210eb20..bf5085c 100644
@@ -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);
 
Signature · 7 lines
2.4.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 9 lines · Hubert Feurstein

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.

---
 commands/login.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox