0001-dropbear-Allow-root-login-fix.patch

Message ID AS8PR02MB83920BF4108BDFCB2FCE492EF0A59@AS8PR02MB8392.eurprd02.prod.outlook.com
State New
Headers show
Series 0001-dropbear-Allow-root-login-fix.patch | expand

Commit Message

Jan Claussen June 7, 2022, 11:56 a.m. UTC
dropbear: Allow root login fix

    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>

Comments

Khem Raj June 7, 2022, 5:59 p.m. UTC | #1
it should be in postprocess for rootfs task I think.

On Tue, Jun 7, 2022 at 4:56 AM Jan Claussen via lists.openembedded.org
<claussen.j=eppendorf.de@lists.openembedded.org> wrote:
>
>     dropbear: Allow root login fix
>
>     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>
> ________________________________
> 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
> ________________________________
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#166659): https://lists.openembedded.org/g/openembedded-core/message/166659
> Mute This Topic: https://lists.openembedded.org/mt/91598485/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>

Patch

commit c7640648578e5fc3b7e589e3f1b420a47f126aee
Author: Jan Claussen <claussen.j@eppendorf.de>
Date:   Tue Jun 7 13:34:41 2022 +0200

    dropbear: Allow root login fix

    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