From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
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 15:10:38 +0200 [thread overview]
Message-ID: <20130416131038.GA32215@game.jcrosoft.org> (raw)
In-Reply-To: <20130416124137.GI1906@pengutronix.de>
On 14:41 Tue 16 Apr , Sascha Hauer wrote:
> 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.
ok why not
>
> > 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()?
don't care
Best Regards,
J.
>
> 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
prev parent reply other threads:[~2013-04-16 13:15 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
2013-04-16 13:10 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
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=20130416131038.GA32215@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/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