]> code.ossystems Code Review - openembedded-core.git/commitdiff
dropbear: add default config file to disable root login
authorJackie Huang <jackie.huang@windriver.com>
Thu, 29 Jun 2017 03:31:47 +0000 (11:31 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 7 Jul 2018 09:59:16 +0000 (10:59 +0100)
root login is disabled by default for openssh and we can
enable it through IMAGE_FEATURES 'debug-tweaks' or
'allow-empty-password', so change to the same default
behavior for dropbear.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/dropbear/dropbear.inc
meta/recipes-core/dropbear/dropbear/dropbear.default [new file with mode: 0644]

index a5dcab882b6b6faf3dccd44389eb5c067a9eb300..2e2fbc15afb59a0707ecaf7ec15e711be622b5c2 100644 (file)
@@ -19,6 +19,7 @@ SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \
            file://dropbearkey.service \
            file://dropbear@.service \
            file://dropbear.socket \
+           file://dropbear.default \
            ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} "
 
 PAM_SRC_URI = "file://0005-dropbear-enable-pam.patch \
@@ -62,6 +63,8 @@ do_install() {
                ${D}${sbindir} \
                ${D}${localstatedir}
 
+       install -m 0644 ${WORKDIR}/dropbear.default ${D}${sysconfdir}/default/dropbear
+
        install -m 0755 dropbearmulti ${D}${sbindir}/
        ln -s ${sbindir}/dropbearmulti ${D}${bindir}/dbclient
 
diff --git a/meta/recipes-core/dropbear/dropbear/dropbear.default b/meta/recipes-core/dropbear/dropbear/dropbear.default
new file mode 100644 (file)
index 0000000..522453a
--- /dev/null
@@ -0,0 +1,2 @@
+# Disallow root logins by default
+DROPBEAR_EXTRA_ARGS="-w"