From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [For-master critical fix PATCH 1/1] login: disable input console if password wrong
Date: Tue, 16 Apr 2013 14:41:37 +0200 [thread overview]
Message-ID: <20130416124137.GI1906@pengutronix.de> (raw)
In-Reply-To: <1365940704-4552-1-git-send-email-plagnioj@jcrosoft.com>
On Sun, Apr 14, 2013 at 01:58:24PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> so we garantie that barebox is secured again user interaction
>
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
> commands/Kconfig | 1 +
> commands/login.c | 5 ++++-
> common/Kconfig | 3 +++
> common/console.c | 6 ++++++
> common/console_common.c | 15 +++++++++++++++
> common/console_simple.c | 7 +++++++
> include/console.h | 12 ++++++++++++
> 7 files changed, 48 insertions(+), 1 deletion(-)
>
> diff --git a/commands/Kconfig b/commands/Kconfig
> index c1454c7..d78c925 100644
> --- a/commands/Kconfig
> +++ b/commands/Kconfig
> @@ -87,6 +87,7 @@ config CMD_MENU_MANAGEMENT
> config CMD_LOGIN
> tristate
> select PASSWORD
> + select CONSOLE_INPUT_RESTRICTION
I don't think this is worth a kconfig option. Just compile it in
unconditionally.
> diff --git a/common/console.c b/common/console.c
> index beb37bd..dcd4d92 100644
> --- a/common/console.c
> +++ b/common/console.c
> @@ -234,6 +234,9 @@ int getc(void)
> unsigned char ch;
> uint64_t start;
>
> + if (!console_is_input_allow())
> + return -EPERM;
Can we rename this to console_input_allowed()?
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
next prev parent reply other threads:[~2013-04-16 12:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-14 11:58 Jean-Christophe PLAGNIOL-VILLARD
2013-04-16 12:41 ` Sascha Hauer [this message]
2013-04-16 13:10 ` Jean-Christophe PLAGNIOL-VILLARD
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=20130416124137.GI1906@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=plagnioj@jcrosoft.com \
/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