summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/dropbear
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/dropbear')
-rw-r--r--meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch20
-rw-r--r--meta/recipes-core/dropbear/dropbear/0005-dropbear-enable-pam.patch21
-rw-r--r--meta/recipes-core/dropbear/dropbear/0006-dropbear-configuration-file.patch17
-rw-r--r--meta/recipes-core/dropbear/dropbear/dropbear-disable-weak-ciphers.patch17
-rw-r--r--meta/recipes-core/dropbear/dropbear_2024.85.bb (renamed from meta/recipes-core/dropbear/dropbear_2022.82.bb)37
5 files changed, 52 insertions, 60 deletions
diff --git a/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch b/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch
index 99adcfd770..9c1dd3f606 100644
--- a/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch
+++ b/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch
@@ -1,15 +1,18 @@
-Subject: [PATCH 1/6] urandom-xauth-changes-to-options.h
+From cdc6a4a57a86d8116a92a5d905993e65cf723556 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard@openedhand.com>
+Date: Wed, 31 Aug 2005 10:45:47 +0000
+Subject: [PATCH] urandom-xauth-changes-to-options.h
Upstream-Status: Inappropriate [configuration]
---
- default_options.h | 2 +-
+ src/default_options.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/default_options.h b/default_options.h
-index 349338c..5ffac25 100644
---- a/default_options.h
-+++ b/default_options.h
-@@ -289,7 +289,7 @@ group1 in Dropbear server too */
+diff --git a/src/default_options.h b/src/default_options.h
+index 6e970bb..ccc8b47 100644
+--- a/src/default_options.h
++++ b/src/default_options.h
+@@ -311,7 +311,7 @@ group1 in Dropbear server too */
/* The command to invoke for xauth when using X11 forwarding.
* "-q" for quiet */
@@ -18,6 +21,3 @@ index 349338c..5ffac25 100644
/* If you want to enable running an sftp server (such as the one included with
---
-2.25.1
-
diff --git a/meta/recipes-core/dropbear/dropbear/0005-dropbear-enable-pam.patch b/meta/recipes-core/dropbear/dropbear/0005-dropbear-enable-pam.patch
index 32c3ea5f08..6743f506e9 100644
--- a/meta/recipes-core/dropbear/dropbear/0005-dropbear-enable-pam.patch
+++ b/meta/recipes-core/dropbear/dropbear/0005-dropbear-enable-pam.patch
@@ -1,7 +1,7 @@
-From b8cece92ba19aa77ac013ea161bfe4c7147747c9 Mon Sep 17 00:00:00 2001
+From 253ca01f0fc50dbaeb2ff8bcece0c34256eba94f Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Wed, 2 Dec 2015 11:36:02 +0200
-Subject: Enable pam
+Subject: [PATCH] Enable pam
We need modify file default_options.h besides enabling pam in
configure if we want dropbear to support pam.
@@ -11,14 +11,14 @@ Upstream-Status: Pending
Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
- default_options.h | 4 ++--
+ src/default_options.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
-diff --git a/default_options.h b/default_options.h
-index 0e3d027..349338c 100644
---- a/default_options.h
-+++ b/default_options.h
-@@ -210,7 +210,7 @@ group1 in Dropbear server too */
+diff --git a/src/default_options.h b/src/default_options.h
+index ccc8b47..12768d1 100644
+--- a/src/default_options.h
++++ b/src/default_options.h
+@@ -228,7 +228,7 @@ group1 in Dropbear server too */
/* Authentication Types - at least one required.
RFC Draft requires pubkey auth, and recommends password */
@@ -27,7 +27,7 @@ index 0e3d027..349338c 100644
/* Note: PAM auth is quite simple and only works for PAM modules which just do
* a simple "Login: " "Password: " (you can edit the strings in svr-authpam.c).
-@@ -218,7 +218,7 @@ group1 in Dropbear server too */
+@@ -236,7 +236,7 @@ group1 in Dropbear server too */
* but there's an interface via a PAM module. It won't work for more complex
* PAM challenge/response.
* You can't enable both PASSWORD and PAM. */
@@ -36,6 +36,3 @@ index 0e3d027..349338c 100644
/* ~/.ssh/authorized_keys authentication.
* You must define DROPBEAR_SVR_PUBKEY_AUTH in order to use plugins. */
---
-2.25.1
-
diff --git a/meta/recipes-core/dropbear/dropbear/0006-dropbear-configuration-file.patch b/meta/recipes-core/dropbear/dropbear/0006-dropbear-configuration-file.patch
index deed78ffb9..44861088cc 100644
--- a/meta/recipes-core/dropbear/dropbear/0006-dropbear-configuration-file.patch
+++ b/meta/recipes-core/dropbear/dropbear/0006-dropbear-configuration-file.patch
@@ -1,4 +1,4 @@
-From e3a5db1b6d3f6382a15b2266458c26c645a10f18 Mon Sep 17 00:00:00 2001
+From 16b147f97f0938cddb55ec1c90bc919c13f26fc0 Mon Sep 17 00:00:00 2001
From: Mingli Yu <Mingli.Yu@windriver.com>
Date: Thu, 6 Sep 2018 15:54:00 +0800
Subject: [PATCH] dropbear configuration file
@@ -12,14 +12,14 @@ Signed-off-by: Maxin B. John <maxin.john@enea.com>
Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
---
- svr-authpam.c | 2 +-
+ src/svr-authpam.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/svr-authpam.c b/svr-authpam.c
-index d201bc9..165ec5c 100644
---- a/svr-authpam.c
-+++ b/svr-authpam.c
-@@ -223,7 +223,7 @@ void svr_auth_pam(int valid_user) {
+diff --git a/src/svr-authpam.c b/src/svr-authpam.c
+index ec14632..026102f 100644
+--- a/src/svr-authpam.c
++++ b/src/svr-authpam.c
+@@ -224,7 +224,7 @@ void svr_auth_pam(int valid_user) {
}
/* Init pam */
@@ -28,6 +28,3 @@ index d201bc9..165ec5c 100644
dropbear_log(LOG_WARNING, "pam_start() failed, rc=%d, %s",
rc, pam_strerror(pamHandlep, rc));
goto cleanup;
---
-2.7.4
-
diff --git a/meta/recipes-core/dropbear/dropbear/dropbear-disable-weak-ciphers.patch b/meta/recipes-core/dropbear/dropbear/dropbear-disable-weak-ciphers.patch
index 5c60868ed8..a20781d31d 100644
--- a/meta/recipes-core/dropbear/dropbear/dropbear-disable-weak-ciphers.patch
+++ b/meta/recipes-core/dropbear/dropbear/dropbear-disable-weak-ciphers.patch
@@ -1,4 +1,4 @@
-From c347ece05a7fdbf50d76cb136b9ed45caed333f6 Mon Sep 17 00:00:00 2001
+From c8a0c8e87b772576f3a431c3b4cacaf5aa001dcc Mon Sep 17 00:00:00 2001
From: Joseph Reynolds <joseph.reynolds1@ibm.com>
Date: Thu, 20 Jun 2019 16:29:15 -0500
Subject: [PATCH] dropbear: new feature: disable-weak-ciphers
@@ -10,14 +10,14 @@ and we want to support the stong algorithms.
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Joseph Reynolds <joseph.reynolds1@ibm.com>
---
- default_options.h | 2 +-
+ src/default_options.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/default_options.h b/default_options.h
-index d417588..bc5200f 100644
---- a/default_options.h
-+++ b/default_options.h
-@@ -180,7 +180,7 @@ IMPORTANT: Some options will require "make clean" after changes */
+diff --git a/src/default_options.h b/src/default_options.h
+index 12768d1..2b07497 100644
+--- a/src/default_options.h
++++ b/src/default_options.h
+@@ -197,7 +197,7 @@ IMPORTANT: Some options will require "make clean" after changes */
* Small systems should generally include either curve25519 or ecdh for performance.
* curve25519 is less widely supported but is faster
*/
@@ -26,6 +26,3 @@ index d417588..bc5200f 100644
#define DROPBEAR_DH_GROUP14_SHA256 1
#define DROPBEAR_DH_GROUP16 0
#define DROPBEAR_CURVE25519 1
---
-2.25.1
-
diff --git a/meta/recipes-core/dropbear/dropbear_2022.82.bb b/meta/recipes-core/dropbear/dropbear_2024.85.bb
index 2de243b889..54001414d0 100644
--- a/meta/recipes-core/dropbear/dropbear_2022.82.bb
+++ b/meta/recipes-core/dropbear/dropbear_2024.85.bb
@@ -12,8 +12,6 @@ DEPENDS = "zlib virtual/crypt"
RPROVIDES:${PN} = "ssh sshd"
RCONFLICTS:${PN} = "openssh-sshd openssh"
-DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-
SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \
file://0001-urandom-xauth-changes-to-options.h.patch \
file://init \
@@ -22,9 +20,10 @@ SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \
file://dropbear.socket \
file://dropbear.default \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
- ${@bb.utils.contains('PACKAGECONFIG', 'disable-weak-ciphers', 'file://dropbear-disable-weak-ciphers.patch', '', d)} "
+ ${@bb.utils.contains('PACKAGECONFIG', 'disable-weak-ciphers', 'file://dropbear-disable-weak-ciphers.patch', '', d)} \
+ "
-SRC_URI[sha256sum] = "3a038d2bbc02bf28bbdd20c012091f741a3ec5cbe460691811d714876aad75d1"
+SRC_URI[sha256sum] = "86b036c433a69d89ce51ebae335d65c47738ccf90d13e5eb0fea832e556da502"
PAM_SRC_URI = "file://0005-dropbear-enable-pam.patch \
file://0006-dropbear-configuration-file.patch \
@@ -35,8 +34,6 @@ PAM_PLUGINS = "libpam-runtime \
pam-plugin-permit \
pam-plugin-unix \
"
-RDEPENDS:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_PLUGINS}', '', d)}"
-
inherit autotools update-rc.d systemd
CVE_PRODUCT = "dropbear_ssh"
@@ -50,12 +47,11 @@ SBINCOMMANDS = "dropbear dropbearkey dropbearconvert"
BINCOMMANDS = "dbclient ssh scp"
EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS} ${BINCOMMANDS}"'
-PACKAGECONFIG ?= "disable-weak-ciphers"
+PACKAGECONFIG ?= "disable-weak-ciphers ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
+PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam,${PAM_PLUGINS}"
PACKAGECONFIG[system-libtom] = "--disable-bundled-libtom,--enable-bundled-libtom,libtommath libtomcrypt"
PACKAGECONFIG[disable-weak-ciphers] = ""
-
-EXTRA_OECONF += "\
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
+PACKAGECONFIG[enable-x11-forwarding] = ""
# This option appends to CFLAGS and LDFLAGS from OE
# This is causing [textrel] QA warning
@@ -64,6 +60,13 @@ EXTRA_OECONF += "--disable-harden"
# musl does not implement wtmp/logwtmp APIs
EXTRA_OECONF:append:libc-musl = " --disable-wtmp --disable-lastlog"
+do_configure:append() {
+ echo "/* Dropbear features */" > ${B}/localoptions.h
+ if ${@bb.utils.contains('PACKAGECONFIG', 'enable-x11-forwarding', 'true', 'false', d)}; then
+ echo "#define DROPBEAR_X11FWD 1" >> ${B}/localoptions.h
+ fi
+}
+
do_install() {
install -d ${D}${sysconfdir} \
${D}${sysconfdir}/init.d \
@@ -73,7 +76,7 @@ do_install() {
${D}${sbindir} \
${D}${localstatedir}
- install -m 0644 ${WORKDIR}/dropbear.default ${D}${sysconfdir}/default/dropbear
+ install -m 0644 ${UNPACKDIR}/dropbear.default ${D}${sysconfdir}/default/dropbear
install -m 0755 dropbearmulti ${D}${sbindir}/
@@ -91,18 +94,18 @@ do_install() {
-e 's,/usr/sbin,${sbindir},g' \
-e 's,/var,${localstatedir},g' \
-e 's,/usr/bin,${bindir},g' \
- -e 's,/usr,${prefix},g' ${WORKDIR}/init > ${D}${sysconfdir}/init.d/dropbear
+ -e 's,/usr,${prefix},g' ${UNPACKDIR}/init > ${D}${sysconfdir}/init.d/dropbear
chmod 755 ${D}${sysconfdir}/init.d/dropbear
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
install -d ${D}${sysconfdir}/pam.d
- install -m 0644 ${WORKDIR}/dropbear ${D}${sysconfdir}/pam.d/
+ install -m 0644 ${UNPACKDIR}/dropbear ${D}${sysconfdir}/pam.d/
fi
# deal with systemd unit files
install -d ${D}${systemd_system_unitdir}
- install -m 0644 ${WORKDIR}/dropbearkey.service ${D}${systemd_system_unitdir}
- install -m 0644 ${WORKDIR}/dropbear@.service ${D}${systemd_system_unitdir}
- install -m 0644 ${WORKDIR}/dropbear.socket ${D}${systemd_system_unitdir}
+ install -m 0644 ${UNPACKDIR}/dropbearkey.service ${D}${systemd_system_unitdir}
+ install -m 0644 ${UNPACKDIR}/dropbear@.service ${D}${systemd_system_unitdir}
+ install -m 0644 ${UNPACKDIR}/dropbear.socket ${D}${systemd_system_unitdir}
sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
-e 's,@BINDIR@,${bindir},g' \
-e 's,@SBINDIR@,${sbindir},g' \
@@ -126,5 +129,3 @@ pkg_postrm:${PN} () {
}
CONFFILES:${PN} = "${sysconfdir}/default/dropbear"
-
-FILES:${PN} += "${bindir}"