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.patch16
-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.patch8
-rw-r--r--meta/recipes-core/dropbear/dropbear/dropbear-disable-weak-ciphers.patch26
-rw-r--r--meta/recipes-core/dropbear/dropbear_2020.81.bb3
-rw-r--r--meta/recipes-core/dropbear/dropbear_2024.84.bb (renamed from meta/recipes-core/dropbear/dropbear.inc)53
6 files changed, 62 insertions, 65 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 684641dcbd..c74f09e484 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
@@ -2,14 +2,14 @@ Subject: [PATCH 1/6] urandom-xauth-changes-to-options.h
2 2
3Upstream-Status: Inappropriate [configuration] 3Upstream-Status: Inappropriate [configuration]
4--- 4---
5 default_options.h | 2 +- 5 src/default_options.h | 2 +-
6 1 file changed, 1 insertion(+), 1 deletion(-) 6 1 file changed, 1 insertion(+), 1 deletion(-)
7 7
8diff --git a/default_options.h b/default_options.h 8diff --git a/src/default_options.h b/src/default_options.h
9index 3b75eb8..1fd8082 100644 9index 6e970bb..ccc8b47 100644
10--- a/default_options.h 10--- a/src/default_options.h
11+++ b/default_options.h 11+++ b/src/default_options.h
12@@ -243,7 +243,7 @@ Homedir is prepended unless path begins with / */ 12@@ -311,7 +311,7 @@ group1 in Dropbear server too */
13 13
14 /* The command to invoke for xauth when using X11 forwarding. 14 /* The command to invoke for xauth when using X11 forwarding.
15 * "-q" for quiet */ 15 * "-q" for quiet */
@@ -17,7 +17,7 @@ index 3b75eb8..1fd8082 100644
17+#define XAUTH_COMMAND "xauth -q" 17+#define XAUTH_COMMAND "xauth -q"
18 18
19 19
20 /* if you want to enable running an sftp server (such as the one included with 20 /* If you want to enable running an sftp server (such as the one included with
21-- 21--
221.7.11.7 222.34.1
23 23
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 857681520c..fe667ddc25 100644
--- a/meta/recipes-core/dropbear/dropbear/0005-dropbear-enable-pam.patch
+++ b/meta/recipes-core/dropbear/dropbear/0005-dropbear-enable-pam.patch
@@ -11,14 +11,14 @@ Upstream-Status: Pending
11Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com> 11Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
12Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> 12Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
13--- 13---
14 default_options.h | 4 ++-- 14 src/default_options.h | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-) 15 1 file changed, 2 insertions(+), 2 deletions(-)
16 16
17diff --git a/default_options.h b/default_options.h 17diff --git a/src/default_options.h b/src/default_options.h
18index 3b75eb8..8617cd0 100644 18index 0e3d027..349338c 100644
19--- a/default_options.h 19--- a/src/default_options.h
20+++ b/default_options.h 20+++ b/src/default_options.h
21@@ -179,7 +179,7 @@ group1 in Dropbear server too */ 21@@ -210,7 +210,7 @@ group1 in Dropbear server too */
22 22
23 /* Authentication Types - at least one required. 23 /* Authentication Types - at least one required.
24 RFC Draft requires pubkey auth, and recommends password */ 24 RFC Draft requires pubkey auth, and recommends password */
@@ -27,16 +27,15 @@ index 3b75eb8..8617cd0 100644
27 27
28 /* Note: PAM auth is quite simple and only works for PAM modules which just do 28 /* Note: PAM auth is quite simple and only works for PAM modules which just do
29 * a simple "Login: " "Password: " (you can edit the strings in svr-authpam.c). 29 * a simple "Login: " "Password: " (you can edit the strings in svr-authpam.c).
30@@ -187,7 +187,7 @@ group1 in Dropbear server too */ 30@@ -218,7 +218,7 @@ group1 in Dropbear server too */
31 * but there's an interface via a PAM module. It won't work for more complex 31 * but there's an interface via a PAM module. It won't work for more complex
32 * PAM challenge/response. 32 * PAM challenge/response.
33 * You can't enable both PASSWORD and PAM. */ 33 * You can't enable both PASSWORD and PAM. */
34-#define DROPBEAR_SVR_PAM_AUTH 0 34-#define DROPBEAR_SVR_PAM_AUTH 0
35+#define DROPBEAR_SVR_PAM_AUTH 1 35+#define DROPBEAR_SVR_PAM_AUTH 1
36 36
37 /* ~/.ssh/authorized_keys authentication */ 37 /* ~/.ssh/authorized_keys authentication.
38 #define DROPBEAR_SVR_PUBKEY_AUTH 1 38 * You must define DROPBEAR_SVR_PUBKEY_AUTH in order to use plugins. */
39
40-- 39--
412.1.4 402.25.1
42 41
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..f54f634a4e 100644
--- a/meta/recipes-core/dropbear/dropbear/0006-dropbear-configuration-file.patch
+++ b/meta/recipes-core/dropbear/dropbear/0006-dropbear-configuration-file.patch
@@ -12,13 +12,13 @@ Signed-off-by: Maxin B. John <maxin.john@enea.com>
12Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com> 12Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
13Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> 13Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
14--- 14---
15 svr-authpam.c | 2 +- 15 src/svr-authpam.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-) 16 1 file changed, 1 insertion(+), 1 deletion(-)
17 17
18diff --git a/svr-authpam.c b/svr-authpam.c 18diff --git a/srec/svr-authpam.c b/src/svr-authpam.c
19index d201bc9..165ec5c 100644 19index d201bc9..165ec5c 100644
20--- a/svr-authpam.c 20--- a/src/svr-authpam.c
21+++ b/svr-authpam.c 21+++ b/src/svr-authpam.c
22@@ -223,7 +223,7 @@ void svr_auth_pam(int valid_user) { 22@@ -223,7 +223,7 @@ void svr_auth_pam(int valid_user) {
23 } 23 }
24 24
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 b54581f17a..f998caa255 100644
--- a/meta/recipes-core/dropbear/dropbear/dropbear-disable-weak-ciphers.patch
+++ b/meta/recipes-core/dropbear/dropbear/dropbear-disable-weak-ciphers.patch
@@ -9,27 +9,23 @@ and we want to support the stong algorithms.
9 9
10Upstream-Status: Inappropriate [configuration] 10Upstream-Status: Inappropriate [configuration]
11Signed-off-by: Joseph Reynolds <joseph.reynolds1@ibm.com> 11Signed-off-by: Joseph Reynolds <joseph.reynolds1@ibm.com>
12
13--- 12---
14 default_options.h | 4 ++-- 13 src/default_options.h | 2 +-
15 1 file changed, 2 insertions(+), 2 deletions(-) 14 1 file changed, 1 insertion(+), 1 deletion(-)
16 15
17diff --git a/default_options.h b/default_options.h 16diff --git a/src/default_options.h b/src/default_options.h
18index 1aa2297..7ff1394 100644 17index d417588..bc5200f 100644
19--- a/default_options.h 18--- a/src/default_options.h
20+++ b/default_options.h 19+++ b/src/default_options.h
21@@ -163,12 +163,12 @@ IMPORTANT: Some options will require "make clean" after changes */ 20@@ -180,7 +180,7 @@ IMPORTANT: Some options will require "make clean" after changes */
22 * Small systems should generally include either curve25519 or ecdh for performance. 21 * Small systems should generally include either curve25519 or ecdh for performance.
23 * curve25519 is less widely supported but is faster 22 * curve25519 is less widely supported but is faster
24 */ 23 */
25-#define DROPBEAR_DH_GROUP14_SHA1 1 24-#define DROPBEAR_DH_GROUP14_SHA1 1
26+#define DROPBEAR_DH_GROUP14_SHA1 0 25+#define DROPBEAR_DH_GROUP14_SHA1 0
27 #define DROPBEAR_DH_GROUP14_SHA256 1 26 #define DROPBEAR_DH_GROUP14_SHA256 1
28 #define DROPBEAR_DH_GROUP16 0 27 #define DROPBEAR_DH_GROUP16 0
29 #define DROPBEAR_CURVE25519 1 28 #define DROPBEAR_CURVE25519 1
30 #define DROPBEAR_ECDH 1 29--
31-#define DROPBEAR_DH_GROUP1 1 302.25.1
32+#define DROPBEAR_DH_GROUP1 0 31
33
34 /* When group1 is enabled it will only be allowed by Dropbear client
35 not as a server, due to concerns over its strength. Set to 0 to allow
diff --git a/meta/recipes-core/dropbear/dropbear_2020.81.bb b/meta/recipes-core/dropbear/dropbear_2020.81.bb
deleted file mode 100644
index c7edea84f8..0000000000
--- a/meta/recipes-core/dropbear/dropbear_2020.81.bb
+++ /dev/null
@@ -1,3 +0,0 @@
1require dropbear.inc
2
3SRC_URI[sha256sum] = "48235d10b37775dbda59341ac0c4b239b82ad6318c31568b985730c788aac53b"
diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear_2024.84.bb
index ed3ef3384a..3ea64b13d0 100644
--- a/meta/recipes-core/dropbear/dropbear.inc
+++ b/meta/recipes-core/dropbear/dropbear_2024.84.bb
@@ -9,10 +9,8 @@ LICENSE = "MIT & BSD-3-Clause & BSD-2-Clause & PD"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=25cf44512b7bc8966a48b6b1a9b7605f" 9LIC_FILES_CHKSUM = "file://LICENSE;md5=25cf44512b7bc8966a48b6b1a9b7605f"
10 10
11DEPENDS = "zlib virtual/crypt" 11DEPENDS = "zlib virtual/crypt"
12RPROVIDES_${PN} = "ssh sshd" 12RPROVIDES:${PN} = "ssh sshd"
13RCONFLICTS_${PN} = "openssh-sshd openssh" 13RCONFLICTS:${PN} = "openssh-sshd openssh"
14
15DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
16 14
17SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \ 15SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \
18 file://0001-urandom-xauth-changes-to-options.h.patch \ 16 file://0001-urandom-xauth-changes-to-options.h.patch \
@@ -22,7 +20,10 @@ SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \
22 file://dropbear.socket \ 20 file://dropbear.socket \
23 file://dropbear.default \ 21 file://dropbear.default \
24 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ 22 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
25 ${@bb.utils.contains('PACKAGECONFIG', 'disable-weak-ciphers', 'file://dropbear-disable-weak-ciphers.patch', '', d)} " 23 ${@bb.utils.contains('PACKAGECONFIG', 'disable-weak-ciphers', 'file://dropbear-disable-weak-ciphers.patch', '', d)} \
24 "
25
26SRC_URI[sha256sum] = "16e22b66b333d6b7e504c43679d04ed6ca30f2838db40a21f935c850dfc01009"
26 27
27PAM_SRC_URI = "file://0005-dropbear-enable-pam.patch \ 28PAM_SRC_URI = "file://0005-dropbear-enable-pam.patch \
28 file://0006-dropbear-configuration-file.patch \ 29 file://0006-dropbear-configuration-file.patch \
@@ -33,8 +34,6 @@ PAM_PLUGINS = "libpam-runtime \
33 pam-plugin-permit \ 34 pam-plugin-permit \
34 pam-plugin-unix \ 35 pam-plugin-unix \
35 " 36 "
36RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_PLUGINS}', '', d)}"
37
38inherit autotools update-rc.d systemd 37inherit autotools update-rc.d systemd
39 38
40CVE_PRODUCT = "dropbear_ssh" 39CVE_PRODUCT = "dropbear_ssh"
@@ -42,25 +41,31 @@ CVE_PRODUCT = "dropbear_ssh"
42INITSCRIPT_NAME = "dropbear" 41INITSCRIPT_NAME = "dropbear"
43INITSCRIPT_PARAMS = "defaults 10" 42INITSCRIPT_PARAMS = "defaults 10"
44 43
45SYSTEMD_SERVICE_${PN} = "dropbear.socket" 44SYSTEMD_SERVICE:${PN} = "dropbear.socket"
46 45
47SBINCOMMANDS = "dropbear dropbearkey dropbearconvert" 46SBINCOMMANDS = "dropbear dropbearkey dropbearconvert"
48BINCOMMANDS = "dbclient ssh scp" 47BINCOMMANDS = "dbclient ssh scp"
49EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS} ${BINCOMMANDS}"' 48EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS} ${BINCOMMANDS}"'
50 49
51PACKAGECONFIG ?= "disable-weak-ciphers" 50PACKAGECONFIG ?= "disable-weak-ciphers ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
51PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam,${PAM_PLUGINS}"
52PACKAGECONFIG[system-libtom] = "--disable-bundled-libtom,--enable-bundled-libtom,libtommath libtomcrypt" 52PACKAGECONFIG[system-libtom] = "--disable-bundled-libtom,--enable-bundled-libtom,libtommath libtomcrypt"
53PACKAGECONFIG[disable-weak-ciphers] = "" 53PACKAGECONFIG[disable-weak-ciphers] = ""
54 54PACKAGECONFIG[enable-x11-forwarding] = ""
55EXTRA_OECONF += "\
56 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
57 55
58# This option appends to CFLAGS and LDFLAGS from OE 56# This option appends to CFLAGS and LDFLAGS from OE
59# This is causing [textrel] QA warning 57# This is causing [textrel] QA warning
60EXTRA_OECONF += "--disable-harden" 58EXTRA_OECONF += "--disable-harden"
61 59
62# musl does not implement wtmp/logwtmp APIs 60# musl does not implement wtmp/logwtmp APIs
63EXTRA_OECONF_append_libc-musl = " --disable-wtmp --disable-lastlog" 61EXTRA_OECONF:append:libc-musl = " --disable-wtmp --disable-lastlog"
62
63do_configure:append() {
64 echo "/* Dropbear features */" > ${B}/localoptions.h
65 if ${@bb.utils.contains('PACKAGECONFIG', 'enable-x11-forwarding', 'true', 'false', d)}; then
66 echo "#define DROPBEAR_X11FWD 1" >> ${B}/localoptions.h
67 fi
68}
64 69
65do_install() { 70do_install() {
66 install -d ${D}${sysconfdir} \ 71 install -d ${D}${sysconfdir} \
@@ -71,7 +76,7 @@ do_install() {
71 ${D}${sbindir} \ 76 ${D}${sbindir} \
72 ${D}${localstatedir} 77 ${D}${localstatedir}
73 78
74 install -m 0644 ${WORKDIR}/dropbear.default ${D}${sysconfdir}/default/dropbear 79 install -m 0644 ${UNPACKDIR}/dropbear.default ${D}${sysconfdir}/default/dropbear
75 80
76 install -m 0755 dropbearmulti ${D}${sbindir}/ 81 install -m 0755 dropbearmulti ${D}${sbindir}/
77 82
@@ -89,32 +94,32 @@ do_install() {
89 -e 's,/usr/sbin,${sbindir},g' \ 94 -e 's,/usr/sbin,${sbindir},g' \
90 -e 's,/var,${localstatedir},g' \ 95 -e 's,/var,${localstatedir},g' \
91 -e 's,/usr/bin,${bindir},g' \ 96 -e 's,/usr/bin,${bindir},g' \
92 -e 's,/usr,${prefix},g' ${WORKDIR}/init > ${D}${sysconfdir}/init.d/dropbear 97 -e 's,/usr,${prefix},g' ${UNPACKDIR}/init > ${D}${sysconfdir}/init.d/dropbear
93 chmod 755 ${D}${sysconfdir}/init.d/dropbear 98 chmod 755 ${D}${sysconfdir}/init.d/dropbear
94 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then 99 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
95 install -d ${D}${sysconfdir}/pam.d 100 install -d ${D}${sysconfdir}/pam.d
96 install -m 0644 ${WORKDIR}/dropbear ${D}${sysconfdir}/pam.d/ 101 install -m 0644 ${UNPACKDIR}/dropbear ${D}${sysconfdir}/pam.d/
97 fi 102 fi
98 103
99 # deal with systemd unit files 104 # deal with systemd unit files
100 install -d ${D}${systemd_unitdir}/system 105 install -d ${D}${systemd_system_unitdir}
101 install -m 0644 ${WORKDIR}/dropbearkey.service ${D}${systemd_unitdir}/system 106 install -m 0644 ${UNPACKDIR}/dropbearkey.service ${D}${systemd_system_unitdir}
102 install -m 0644 ${WORKDIR}/dropbear@.service ${D}${systemd_unitdir}/system 107 install -m 0644 ${UNPACKDIR}/dropbear@.service ${D}${systemd_system_unitdir}
103 install -m 0644 ${WORKDIR}/dropbear.socket ${D}${systemd_unitdir}/system 108 install -m 0644 ${UNPACKDIR}/dropbear.socket ${D}${systemd_system_unitdir}
104 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ 109 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
105 -e 's,@BINDIR@,${bindir},g' \ 110 -e 's,@BINDIR@,${bindir},g' \
106 -e 's,@SBINDIR@,${sbindir},g' \ 111 -e 's,@SBINDIR@,${sbindir},g' \
107 ${D}${systemd_unitdir}/system/dropbear.socket ${D}${systemd_unitdir}/system/*.service 112 ${D}${systemd_system_unitdir}/dropbear.socket ${D}${systemd_system_unitdir}/*.service
108} 113}
109 114
110inherit update-alternatives 115inherit update-alternatives
111 116
112ALTERNATIVE_PRIORITY = "20" 117ALTERNATIVE_PRIORITY = "20"
113ALTERNATIVE_${PN} = "${@bb.utils.filter('BINCOMMANDS', 'scp ssh', d)}" 118ALTERNATIVE:${PN} = "${@bb.utils.filter('BINCOMMANDS', 'scp ssh', d)}"
114 119
115ALTERNATIVE_TARGET = "${sbindir}/dropbearmulti" 120ALTERNATIVE_TARGET = "${sbindir}/dropbearmulti"
116 121
117pkg_postrm_append_${PN} () { 122pkg_postrm:${PN} () {
118 if [ -f "${sysconfdir}/dropbear/dropbear_rsa_host_key" ]; then 123 if [ -f "${sysconfdir}/dropbear/dropbear_rsa_host_key" ]; then
119 rm ${sysconfdir}/dropbear/dropbear_rsa_host_key 124 rm ${sysconfdir}/dropbear/dropbear_rsa_host_key
120 fi 125 fi
@@ -123,4 +128,4 @@ pkg_postrm_append_${PN} () {
123 fi 128 fi
124} 129}
125 130
126FILES_${PN} += "${bindir}" 131CONFFILES:${PN} = "${sysconfdir}/default/dropbear"