Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Luca Ceresoli <luca.ceresoli@bootlin.com>
To: "Jan Claussen via lists.openembedded.org"
	<claussen.j=eppendorf.de@lists.openembedded.org>
Cc: claussen.j@eppendorf.de,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] dropbear: Allow root login fix
Date: Wed, 8 Jun 2022 09:48:24 +0200	[thread overview]
Message-ID: <20220608094824.028155bb@booty> (raw)
In-Reply-To: <AS8PR02MB8392C950253DEB9B054726B9F0A59@AS8PR02MB8392.eurprd02.prod.outlook.com>

Hi Jan,

On Tue, 7 Jun 2022 12:36:15 +0000
"Jan Claussen via lists.openembedded.org"
<claussen.j=eppendorf.de@lists.openembedded.org> wrote:

>     This enables root login when either "allow-root-login" or "debug-tweaks"
>     were set in EXTRA_IMAGE_FEATURES.
> 
>     Signed-off-by: Jan Claussen <claussen.j@eppendorf.de>

Thanks for your patch. However I have a couple comments.

First, please try to send patches using 'git format-patch' and 'git
send-email'. Otherwise the format makes it hard to apply it. Even
though this one has a better format than your previous submission
(thanks for taking care of that!), using the git tools will simplify
both yours and others' task.

> diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc
> index 78f9f9adbd..e545c425ab 100644
> --- a/meta/recipes-core/dropbear/dropbear.inc
> +++ b/meta/recipes-core/dropbear/dropbear.inc
> @@ -105,6 +105,13 @@ do_install() {
>   -e 's,@BINDIR@,${bindir},g' \
>   -e 's,@SBINDIR@,${sbindir},g' \
>   ${D}${systemd_system_unitdir}/dropbear.socket ${D}${systemd_system_unitdir}/*.service
> +
> +    # Enable root login for dropbear when debug-tweaks or allow-root-login are set
> +    if [ "${@bb.utils.filter('EXTRA_IMAGE_FEATURES', 'debug-tweaks', d)}" \
> +         || "${@bb.utils.filter('EXTRA_IMAGE_FEATURES', 'allow-root-login', d)}" ]; then
> +            sed -i 's/-w//g' ${D}/etc/default/dropbear
> +    fi
> +
>  }

Actually I don't think this should be needed at all because
meta/classes/rootfs-postcommands.bbclass already does this.
If that doesn't work for you, then maybe you could explain your problem
so we can help you find out why.

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


      reply	other threads:[~2022-06-08  7:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-07 12:36 dropbear: Allow root login fix Jan Claussen
2022-06-08  7:48 ` Luca Ceresoli [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=20220608094824.028155bb@booty \
    --to=luca.ceresoli@bootlin.com \
    --cc=claussen.j=eppendorf.de@lists.openembedded.org \
    --cc=claussen.j@eppendorf.de \
    --cc=openembedded-core@lists.openembedded.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