diff options
author | Randy MacLeod <randy.macleod@windriver.com> | 2021-02-24 20:46:24 -0500 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-02-25 08:48:04 -0800 |
commit | 26ec5b73826b6ab3ac0e74605377c30ed6da7f33 (patch) | |
tree | 27dde9c73448f46be118cc97094090460199fe27 | |
parent | 2f887a4d0d77a7434f42899bf3669d79570cb473 (diff) | |
download | meta-openembedded-26ec5b73826b6ab3ac0e74605377c30ed6da7f33.tar.gz |
libssh2: remove the recipe since it moved to oe-core
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
5 files changed, 0 insertions, 268 deletions
diff --git a/meta-oe/recipes-support/libssh2/files/0001-Don-t-let-host-enviroment-to-decide-if-a-test-is-bui.patch b/meta-oe/recipes-support/libssh2/files/0001-Don-t-let-host-enviroment-to-decide-if-a-test-is-bui.patch deleted file mode 100644 index 5ff9bf846..000000000 --- a/meta-oe/recipes-support/libssh2/files/0001-Don-t-let-host-enviroment-to-decide-if-a-test-is-bui.patch +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | From f9e3e2ee7b18ba5bb8efe083171f3e701eb0a663 Mon Sep 17 00:00:00 2001 | ||
2 | From: Your Name <you@example.com> | ||
3 | Date: Mon, 28 Dec 2020 02:08:03 +0000 | ||
4 | Subject: [PATCH] Don't let host enviroment to decide if a test is build | ||
5 | |||
6 | test ssh2.sh need sshd, for cross compile, we need it on target, so | ||
7 | don't use SSHD on host to decide weither to build a test | ||
8 | |||
9 | Upstream-Status: Inappropriate[oe specific] | ||
10 | |||
11 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
12 | --- | ||
13 | tests/Makefile.am | 6 +----- | ||
14 | 1 file changed, 1 insertion(+), 5 deletions(-) | ||
15 | |||
16 | diff --git a/tests/Makefile.am b/tests/Makefile.am | ||
17 | index dc0922f..6cbc35d 100644 | ||
18 | --- a/tests/Makefile.am | ||
19 | +++ b/tests/Makefile.am | ||
20 | @@ -1,16 +1,12 @@ | ||
21 | AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/include -I$(top_builddir)/src | ||
22 | LDADD = ../src/libssh2.la | ||
23 | |||
24 | -if SSHD | ||
25 | noinst_PROGRAMS = ssh2 | ||
26 | ssh2_SOURCES = ssh2.c | ||
27 | -endif | ||
28 | |||
29 | ctests = simple$(EXEEXT) | ||
30 | TESTS = $(ctests) mansyntax.sh | ||
31 | -if SSHD | ||
32 | TESTS += ssh2.sh | ||
33 | -endif | ||
34 | check_PROGRAMS = $(ctests) | ||
35 | |||
36 | TESTS_ENVIRONMENT = SSHD=$(SSHD) EXEEXT=$(EXEEXT) | ||
37 | @@ -38,4 +34,4 @@ if OPENSSL | ||
38 | # EXTRA_DIST += test_public_key_auth_succeeds_with_correct_encrypted_ed25519_key.c | ||
39 | # EXTRA_DIST += test_public_key_auth_succeeds_with_correct_ed25519_key_from_mem.c | ||
40 | EXTRA_DIST += test_public_key_auth_succeeds_with_correct_rsa_openssh_key.c | ||
41 | -endif | ||
42 | \ No newline at end of file | ||
43 | +endif | ||
44 | -- | ||
45 | 2.20.1 | ||
46 | |||
diff --git a/meta-oe/recipes-support/libssh2/files/0001-configure-Conditionally-undefine-backend-m4-macro.patch b/meta-oe/recipes-support/libssh2/files/0001-configure-Conditionally-undefine-backend-m4-macro.patch deleted file mode 100644 index 1128c7ea0..000000000 --- a/meta-oe/recipes-support/libssh2/files/0001-configure-Conditionally-undefine-backend-m4-macro.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From efe7101786193eaddb749c0583af6b54aec6f289 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 2 Feb 2021 18:45:16 -0800 | ||
4 | Subject: [PATCH] configure: Conditionally undefine backend m4 macro | ||
5 | |||
6 | Unlike the M4 builtin, this macro fails if macro is not defined | ||
7 | therefore recover the behavior of the builtin. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | configure.ac | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/configure.ac b/configure.ac | ||
16 | index fe5054a..758f8c2 100644 | ||
17 | --- a/configure.ac | ||
18 | +++ b/configure.ac | ||
19 | @@ -127,7 +127,7 @@ fi | ||
20 | m4_set_foreach([crypto_backends], [backend], | ||
21 | [AM_CONDITIONAL(m4_toupper(backend), test "$found_crypto" = "backend")] | ||
22 | ) | ||
23 | -m4_undefine([backend]) | ||
24 | +m4_ifdef([backend], [m4_undefine([backend])]) | ||
25 | |||
26 | |||
27 | # libz | ||
28 | -- | ||
29 | 2.30.0 | ||
30 | |||
diff --git a/meta-oe/recipes-support/libssh2/files/CVE-2019-17498.patch b/meta-oe/recipes-support/libssh2/files/CVE-2019-17498.patch deleted file mode 100644 index 001080072..000000000 --- a/meta-oe/recipes-support/libssh2/files/CVE-2019-17498.patch +++ /dev/null | |||
@@ -1,131 +0,0 @@ | |||
1 | From dedcbd106f8e52d5586b0205bc7677e4c9868f9c Mon Sep 17 00:00:00 2001 | ||
2 | From: Will Cosgrove <will@panic.com> | ||
3 | Date: Fri, 30 Aug 2019 09:57:38 -0700 | ||
4 | Subject: [PATCH] packet.c: improve message parsing (#402) | ||
5 | |||
6 | * packet.c: improve parsing of packets | ||
7 | |||
8 | file: packet.c | ||
9 | |||
10 | notes: | ||
11 | Use _libssh2_get_string API in SSH_MSG_DEBUG/SSH_MSG_DISCONNECT. Additional uint32 bounds check in SSH_MSG_GLOBAL_REQUEST. | ||
12 | |||
13 | Upstream-Status: Backport | ||
14 | CVE: CVE-2019-17498 | ||
15 | Signed-off-by: Li Zhou <li.zhou@windriver.com> | ||
16 | --- | ||
17 | src/packet.c | 68 ++++++++++++++++++++++------------------------------ | ||
18 | 1 file changed, 29 insertions(+), 39 deletions(-) | ||
19 | |||
20 | diff --git a/src/packet.c b/src/packet.c | ||
21 | index 38ab629..2e01bfc 100644 | ||
22 | --- a/src/packet.c | ||
23 | +++ b/src/packet.c | ||
24 | @@ -419,8 +419,8 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, | ||
25 | size_t datalen, int macstate) | ||
26 | { | ||
27 | int rc = 0; | ||
28 | - char *message = NULL; | ||
29 | - char *language = NULL; | ||
30 | + unsigned char *message = NULL; | ||
31 | + unsigned char *language = NULL; | ||
32 | size_t message_len = 0; | ||
33 | size_t language_len = 0; | ||
34 | LIBSSH2_CHANNEL *channelp = NULL; | ||
35 | @@ -472,33 +472,23 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, | ||
36 | |||
37 | case SSH_MSG_DISCONNECT: | ||
38 | if(datalen >= 5) { | ||
39 | - size_t reason = _libssh2_ntohu32(data + 1); | ||
40 | + uint32_t reason = 0; | ||
41 | + struct string_buf buf; | ||
42 | + buf.data = (unsigned char *)data; | ||
43 | + buf.dataptr = buf.data; | ||
44 | + buf.len = datalen; | ||
45 | + buf.dataptr++; /* advance past type */ | ||
46 | |||
47 | - if(datalen >= 9) { | ||
48 | - message_len = _libssh2_ntohu32(data + 5); | ||
49 | + _libssh2_get_u32(&buf, &reason); | ||
50 | + _libssh2_get_string(&buf, &message, &message_len); | ||
51 | + _libssh2_get_string(&buf, &language, &language_len); | ||
52 | |||
53 | - if(message_len < datalen-13) { | ||
54 | - /* 9 = packet_type(1) + reason(4) + message_len(4) */ | ||
55 | - message = (char *) data + 9; | ||
56 | - | ||
57 | - language_len = | ||
58 | - _libssh2_ntohu32(data + 9 + message_len); | ||
59 | - language = (char *) data + 9 + message_len + 4; | ||
60 | - | ||
61 | - if(language_len > (datalen-13-message_len)) { | ||
62 | - /* bad input, clear info */ | ||
63 | - language = message = NULL; | ||
64 | - language_len = message_len = 0; | ||
65 | - } | ||
66 | - } | ||
67 | - else | ||
68 | - /* bad size, clear it */ | ||
69 | - message_len = 0; | ||
70 | - } | ||
71 | if(session->ssh_msg_disconnect) { | ||
72 | - LIBSSH2_DISCONNECT(session, reason, message, | ||
73 | - message_len, language, language_len); | ||
74 | + LIBSSH2_DISCONNECT(session, reason, (const char *)message, | ||
75 | + message_len, (const char *)language, | ||
76 | + language_len); | ||
77 | } | ||
78 | + | ||
79 | _libssh2_debug(session, LIBSSH2_TRACE_TRANS, | ||
80 | "Disconnect(%d): %s(%s)", reason, | ||
81 | message, language); | ||
82 | @@ -539,24 +529,24 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, | ||
83 | int always_display = data[1]; | ||
84 | |||
85 | if(datalen >= 6) { | ||
86 | - message_len = _libssh2_ntohu32(data + 2); | ||
87 | - | ||
88 | - if(message_len <= (datalen - 10)) { | ||
89 | - /* 6 = packet_type(1) + display(1) + message_len(4) */ | ||
90 | - message = (char *) data + 6; | ||
91 | - language_len = _libssh2_ntohu32(data + 6 + | ||
92 | - message_len); | ||
93 | - | ||
94 | - if(language_len <= (datalen - 10 - message_len)) | ||
95 | - language = (char *) data + 10 + message_len; | ||
96 | - } | ||
97 | + struct string_buf buf; | ||
98 | + buf.data = (unsigned char *)data; | ||
99 | + buf.dataptr = buf.data; | ||
100 | + buf.len = datalen; | ||
101 | + buf.dataptr += 2; /* advance past type & always display */ | ||
102 | + | ||
103 | + _libssh2_get_string(&buf, &message, &message_len); | ||
104 | + _libssh2_get_string(&buf, &language, &language_len); | ||
105 | } | ||
106 | |||
107 | if(session->ssh_msg_debug) { | ||
108 | - LIBSSH2_DEBUG(session, always_display, message, | ||
109 | - message_len, language, language_len); | ||
110 | + LIBSSH2_DEBUG(session, always_display, | ||
111 | + (const char *)message, | ||
112 | + message_len, (const char *)language, | ||
113 | + language_len); | ||
114 | } | ||
115 | } | ||
116 | + | ||
117 | /* | ||
118 | * _libssh2_debug will actually truncate this for us so | ||
119 | * that it's not an inordinate about of data | ||
120 | @@ -579,7 +569,7 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, | ||
121 | uint32_t len = 0; | ||
122 | unsigned char want_reply = 0; | ||
123 | len = _libssh2_ntohu32(data + 1); | ||
124 | - if(datalen >= (6 + len)) { | ||
125 | + if((len <= (UINT_MAX - 6)) && (datalen >= (6 + len))) { | ||
126 | want_reply = data[5 + len]; | ||
127 | _libssh2_debug(session, | ||
128 | LIBSSH2_TRACE_CONN, | ||
129 | -- | ||
130 | 2.17.1 | ||
131 | |||
diff --git a/meta-oe/recipes-support/libssh2/files/run-ptest b/meta-oe/recipes-support/libssh2/files/run-ptest deleted file mode 100644 index 5fd7ec65f..000000000 --- a/meta-oe/recipes-support/libssh2/files/run-ptest +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | ptestdir=$(dirname "$(readlink -f "$0")") | ||
4 | cd tests | ||
5 | for test in simple ssh2.sh mansyntax.sh | ||
6 | do | ||
7 | ./../test-driver --test-name $test --log-file ../$test.log --trs-file ../$test.trs --color-tests no --enable-hard-errors yes --expect-failure no -- ./$test | ||
8 | done | ||
diff --git a/meta-oe/recipes-support/libssh2/libssh2_1.9.0.bb b/meta-oe/recipes-support/libssh2/libssh2_1.9.0.bb deleted file mode 100644 index 0b8ccbd21..000000000 --- a/meta-oe/recipes-support/libssh2/libssh2_1.9.0.bb +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | SUMMARY = "A client-side C library implementing the SSH2 protocol" | ||
2 | HOMEPAGE = "http://www.libssh2.org/" | ||
3 | SECTION = "libs" | ||
4 | |||
5 | DEPENDS = "zlib" | ||
6 | |||
7 | LICENSE = "BSD-3-Clause" | ||
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=c5cf34fc0acb44b082ef50ef5e4354ca" | ||
9 | |||
10 | SRC_URI = "http://www.libssh2.org/download/${BP}.tar.gz \ | ||
11 | file://CVE-2019-17498.patch \ | ||
12 | file://0001-configure-Conditionally-undefine-backend-m4-macro.patch \ | ||
13 | file://run-ptest \ | ||
14 | " | ||
15 | |||
16 | SRC_URI_append_ptest = " file://0001-Don-t-let-host-enviroment-to-decide-if-a-test-is-bui.patch" | ||
17 | |||
18 | SRC_URI[md5sum] = "1beefafe8963982adc84b408b2959927" | ||
19 | SRC_URI[sha256sum] = "d5fb8bd563305fd1074dda90bd053fb2d29fc4bce048d182f96eaa466dfadafd" | ||
20 | |||
21 | inherit autotools pkgconfig ptest | ||
22 | |||
23 | EXTRA_OECONF += "\ | ||
24 | --with-libz \ | ||
25 | --with-libz-prefix=${STAGING_LIBDIR} \ | ||
26 | " | ||
27 | |||
28 | # only one of openssl and gcrypt could be set | ||
29 | PACKAGECONFIG ??= "openssl" | ||
30 | PACKAGECONFIG[openssl] = "--with-crypto=openssl --with-libssl-prefix=${STAGING_LIBDIR}, , openssl" | ||
31 | PACKAGECONFIG[gcrypt] = "--with-crypto=libgcrypt --with-libgcrypt-prefix=${STAGING_EXECPREFIXDIR}, , libgcrypt" | ||
32 | |||
33 | BBCLASSEXTEND = "native nativesdk" | ||
34 | |||
35 | # required for ptest on documentation | ||
36 | RDEPENDS_${PN}-ptest = "man-db openssh" | ||
37 | RDEPENDS_${PN}-ptest_append_libc-glibc = " locale-base-en-us" | ||
38 | |||
39 | do_compile_ptest() { | ||
40 | sed -i "/\$(MAKE) \$(AM_MAKEFLAGS) check-TESTS/d" tests/Makefile | ||
41 | oe_runmake check | ||
42 | } | ||
43 | |||
44 | do_install_ptest() { | ||
45 | install -d ${D}${PTEST_PATH}/tests | ||
46 | install -m 0755 ${S}/test-driver ${D}${PTEST_PATH}/ | ||
47 | cp -rf ${B}/tests/.libs/* ${D}${PTEST_PATH}/tests/ | ||
48 | cp -rf ${S}/tests/mansyntax.sh ${D}${PTEST_PATH}/tests/ | ||
49 | cp -rf ${S}/tests/ssh2.sh ${D}${PTEST_PATH}/tests/ | ||
50 | cp -rf ${S}/tests/etc ${D}${PTEST_PATH}/tests/ | ||
51 | mkdir -p ${D}${PTEST_PATH}/docs | ||
52 | cp -r ${S}/docs/* ${D}${PTEST_PATH}/docs/ | ||
53 | } | ||