From: Hubert Feurstein <h.feurstein@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH] login: fix broken login command
Date: Wed, 17 Jun 2015 15:02:53 +0200 [thread overview]
Message-ID: <1434546173-18283-1-git-send-email-h.feurstein@gmail.com> (raw)
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
next reply other threads:[~2015-06-17 13:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-17 13:02 Hubert Feurstein [this message]
2015-06-18 7:44 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1434546173-18283-1-git-send-email-h.feurstein@gmail.com \
--to=h.feurstein@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox