All of lore.kernel.org
 help / color / mirror / Atom feed
* dropbear: Allow root login fix
@ 2022-06-07 12:36 Jan Claussen
  2022-06-08  7:48 ` [OE-core] " Luca Ceresoli
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Claussen @ 2022-06-07 12:36 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2440 bytes --]

    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>

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
+
 }

 inherit update-alternatives
________________________________
This email including its attachments is intended for the person or entity only to which it is addressed. It may contain confidential and/or privileged material. Any review, forwarding, dissemination, other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this email in error, please contact the sender and delete the material from any computer system.
________________________________


Eppendorf SE, Hamburg, Barkhausenweg 1, 22339 Hamburg, Amtsgericht Hamburg HRB 171526
Vors. des Aufsichtsrats: Philipp von Loeper
Vorstand: Eva van Pelt (Co-Vorsitzende), Dr. Peter Fruhstorfer (Co-Vorsitzender), Axel Jaeger und Dr. Wilhelm Plüster

Eppendorf Instrumente GmbH, Hamburg, Amtsgericht Hamburg, HRB 69077
Geschäftsführer: Dr. Bernd Petersen und Dr. Alexander Papra

Eppendorf Liquid Handling GmbH, Hamburg, Amtsgericht Hamburg, HRB 92250
Geschäftsführer: Dietmar Stadler


________________________________
According to the general high quality approach of Eppendorf, we apply to our mail traffic the latest protection technologies and methods, including extensive scanning and DMARC, to help our communication partners in protecting their IT environment.
Privacy information according to Articles 13 and 14 GDPR can be found here: www.eppendorf.com/gdpr
<http://www.eppendorf.com/gdpr>
________________________________

[-- Attachment #2: Type: text/html, Size: 3409 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [OE-core] dropbear: Allow root login fix
  2022-06-07 12:36 dropbear: Allow root login fix Jan Claussen
@ 2022-06-08  7:48 ` Luca Ceresoli
  0 siblings, 0 replies; 2+ messages in thread
From: Luca Ceresoli @ 2022-06-08  7:48 UTC (permalink / raw)
  To: Jan Claussen via lists.openembedded.org; +Cc: claussen.j, openembedded-core

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-08  7:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-07 12:36 dropbear: Allow root login fix Jan Claussen
2022-06-08  7:48 ` [OE-core] " Luca Ceresoli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.