- libssh2: bump up to 1.10.0
Change-Id: Ic32b23fbb771296d208da66d7f8c8ae6b29d0039
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/15893
Reviewed-by: Michelle Wang <michellew@vmware.com>
Tested-by: Michelle Wang <michellew@vmware.com>
| 1 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,72 +0,0 @@ |
| 1 |
-From 1c6fa92b77e34d089493fe6d3e2c6c8775858b94 Mon Sep 17 00:00:00 2001 |
|
| 2 |
-From: Will Cosgrove <will@panic.com> |
|
| 3 |
-Date: Thu, 29 Aug 2019 15:24:22 -0700 |
|
| 4 |
-Subject: [PATCH] fixed type issue, updated SSH_MSG_DISCONNECT |
|
| 5 |
- |
|
| 6 |
-SSH_MSG_DISCONNECT now also uses _libssh2_get API. |
|
| 7 |
- src/packet.c | 40 +++++++++++++++------------------------- |
|
| 8 |
- 1 file changed, 15 insertions(+), 25 deletions(-) |
|
| 9 |
- |
|
| 10 |
-diff --git a/src/packet.c b/src/packet.c |
|
| 11 |
-index 8908b2c5..97f0cdd4 100644 |
|
| 12 |
-+++ b/src/packet.c |
|
| 13 |
-@@ -419,8 +419,8 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, |
|
| 14 |
- size_t datalen, int macstate) |
|
| 15 |
- {
|
|
| 16 |
- int rc = 0; |
|
| 17 |
-- char *message = NULL; |
|
| 18 |
-- char *language = NULL; |
|
| 19 |
-+ unsigned char *message = NULL; |
|
| 20 |
-+ unsigned char *language = NULL; |
|
| 21 |
- size_t message_len = 0; |
|
| 22 |
- size_t language_len = 0; |
|
| 23 |
- LIBSSH2_CHANNEL *channelp = NULL; |
|
| 24 |
-@@ -472,33 +472,23 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, |
|
| 25 |
- |
|
| 26 |
- case SSH_MSG_DISCONNECT: |
|
| 27 |
- if(datalen >= 5) {
|
|
| 28 |
-- size_t reason = _libssh2_ntohu32(data + 1); |
|
| 29 |
-+ uint32_t reason = 0; |
|
| 30 |
-+ struct string_buf buf; |
|
| 31 |
-+ buf.data = (unsigned char *)data; |
|
| 32 |
-+ buf.dataptr = buf.data; |
|
| 33 |
-+ buf.len = datalen; |
|
| 34 |
-+ buf.dataptr++; /* advance past type */ |
|
| 35 |
- |
|
| 36 |
-- if(datalen >= 9) {
|
|
| 37 |
-- message_len = _libssh2_ntohu32(data + 5); |
|
| 38 |
-+ _libssh2_get_u32(&buf, &reason); |
|
| 39 |
-+ _libssh2_get_string(&buf, &message, &message_len); |
|
| 40 |
-+ _libssh2_get_string(&buf, &language, &language_len); |
|
| 41 |
- |
|
| 42 |
-- if(message_len < datalen-13) {
|
|
| 43 |
-- /* 9 = packet_type(1) + reason(4) + message_len(4) */ |
|
| 44 |
-- message = (char *) data + 9; |
|
| 45 |
-- |
|
| 46 |
-- language_len = |
|
| 47 |
-- _libssh2_ntohu32(data + 9 + message_len); |
|
| 48 |
-- language = (char *) data + 9 + message_len + 4; |
|
| 49 |
-- |
|
| 50 |
-- if(language_len > (datalen-13-message_len)) {
|
|
| 51 |
-- /* bad input, clear info */ |
|
| 52 |
-- language = message = NULL; |
|
| 53 |
-- language_len = message_len = 0; |
|
| 54 |
-- } |
|
| 55 |
-- } |
|
| 56 |
-- else |
|
| 57 |
-- /* bad size, clear it */ |
|
| 58 |
-- message_len = 0; |
|
| 59 |
-- } |
|
| 60 |
- if(session->ssh_msg_disconnect) {
|
|
| 61 |
-- LIBSSH2_DISCONNECT(session, reason, message, |
|
| 62 |
-- message_len, language, language_len); |
|
| 63 |
-+ LIBSSH2_DISCONNECT(session, reason, (const char *)message, |
|
| 64 |
-+ message_len, (const char *)language, |
|
| 65 |
-+ language_len); |
|
| 66 |
- } |
|
| 67 |
-+ |
|
| 68 |
- _libssh2_debug(session, LIBSSH2_TRACE_TRANS, |
|
| 69 |
- "Disconnect(%d): %s(%s)", reason, |
|
| 70 |
- message, language); |
| ... | ... |
@@ -1,34 +1,33 @@ |
| 1 | 1 |
Summary: libssh2 is a library implementing the SSH2 protocol. |
| 2 | 2 |
Name: libssh2 |
| 3 |
-Version: 1.9.0 |
|
| 4 |
-Release: 4%{?dist}
|
|
| 3 |
+Version: 1.10.0 |
|
| 4 |
+Release: 1%{?dist}
|
|
| 5 | 5 |
License: BSD |
| 6 | 6 |
URL: https://www.libssh2.org/ |
| 7 | 7 |
Group: System Environment/NetworkingLibraries |
| 8 | 8 |
Vendor: VMware, Inc. |
| 9 | 9 |
Distribution: Photon |
| 10 | 10 |
Source0: https://www.libssh2.org/download/libssh2-%{version}.tar.gz
|
| 11 |
-%define sha1 libssh2=21e98282b103307a16792e5e2d4c99beaf0b3b9c |
|
| 12 |
-Patch0: CVE-2019-17498.patch |
|
| 11 |
+%define sha512 libssh2=e064ee1089eb8e6cd5fa2617f4fd8ff56c2721c5476775a98bdb68c6c4ee4d05c706c3bb0eb479a27a8ec0b17a8a5ef43e1d028ad3f134519aa582d3981a3a30 |
|
| 13 | 12 |
BuildRequires: openssl-devel |
| 14 | 13 |
BuildRequires: zlib-devel |
| 15 | 14 |
BuildRequires: pkg-config |
| 16 |
- |
|
| 17 | 15 |
Requires: openssl |
| 18 | 16 |
Requires: zlib |
| 19 | 17 |
|
| 20 | 18 |
%description |
| 21 | 19 |
libssh2 is a client-side C library implementing the SSH2 protocol. |
| 22 | 20 |
|
| 23 |
-%package devel |
|
| 24 |
-Summary: Header files for libssh2 |
|
| 25 |
-Group: System Environment/NetworkingLibraries |
|
| 26 |
-Requires: libssh2 |
|
| 27 |
-%description devel |
|
| 21 |
+%package devel |
|
| 22 |
+Summary: Header files for libssh2 |
|
| 23 |
+Group: System Environment/NetworkingLibraries |
|
| 24 |
+Requires: libssh2 |
|
| 25 |
+ |
|
| 26 |
+%description devel |
|
| 28 | 27 |
These are the header files of libssh2. |
| 29 | 28 |
|
| 30 | 29 |
%prep |
| 31 |
-%autosetup -p1 |
|
| 30 |
+%autosetup |
|
| 32 | 31 |
|
| 33 | 32 |
%build |
| 34 | 33 |
if [ %{_host} != %{_build} ]; then
|
| ... | ... |
@@ -58,6 +57,8 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';'
|
| 58 | 58 |
%{_mandir}/man3/*
|
| 59 | 59 |
|
| 60 | 60 |
%changelog |
| 61 |
+* Thu Apr 21 2022 Gerrit Photon <photon-checkins@vmware.com> 1.10.0-1 |
|
| 62 |
+- Automatic Version Bump |
|
| 61 | 63 |
* Wed Aug 04 2021 Satya Naga Vasamsetty <svasamsetty@vmware.com> 1.9.0-4 |
| 62 | 64 |
- Bump up release for openssl |
| 63 | 65 |
* Tue Dec 15 2020 Shreenidhi Shedi <sshedi@vmware.com> 1.9.0-3 |