Compare commits
No commits in common. "c10s" and "c8" have entirely different histories.
@ -1 +0,0 @@
|
||||
1
|
||||
58
.gitignore
vendored
58
.gitignore
vendored
@ -1,57 +1 @@
|
||||
lftp-4.0.9.tar.lzma
|
||||
lftp-4.0.10.tar.xz
|
||||
/lftp-4.1.0.tar.xz
|
||||
/lftp-4.1.1.tar.xz
|
||||
/lftp-4.1.2.tar.xz
|
||||
/lftp-4.1.3.tar.xz
|
||||
/lftp-4.2.1.tar.xz
|
||||
/lftp-4.2.2.tar.xz
|
||||
/lftp-4.2.3.tar.xz
|
||||
/lftp-4.3.0.tar.xz
|
||||
/lftp-4.3.1.tar.xz
|
||||
/lftp-4.3.2.tar.xz
|
||||
/lftp-4.3.3.tar.xz
|
||||
/lftp-4.3.4.tar.xz
|
||||
/lftp-4.3.6.tar.xz
|
||||
/lftp-4.3.7.tar.xz
|
||||
/lftp-4.4.0.tar.xz
|
||||
/lftp-4.4.1.tar.xz
|
||||
/lftp-4.4.2.tar.xz
|
||||
/lftp-4.4.3.tar.xz
|
||||
/lftp-4.4.5.tar.xz
|
||||
/lftp-4.4.6.tar.xz
|
||||
/lftp-4.4.7.tar.xz
|
||||
/lftp-4.4.8.tar.xz
|
||||
/lftp-4.4.9.tar.xz
|
||||
/lftp-4.4.10.tar.xz
|
||||
/lftp-4.4.11.tar.xz
|
||||
/lftp-4.4.13.tar.xz
|
||||
/lftp-4.4.14.tar.xz
|
||||
/lftp-4.4.15.tar.xz
|
||||
/lftp-4.4.16.tar.xz
|
||||
/lftp-4.5.0.tar.xz
|
||||
/lftp-4.5.1.tar.xz
|
||||
/lftp-4.5.2.tar.xz
|
||||
/lftp-4.5.3.tar.xz
|
||||
/lftp-4.5.4.tar.xz
|
||||
/lftp-4.6.0.tar.xz
|
||||
/lftp-4.6.1.tar.xz
|
||||
/lftp-4.6.4.tar.xz
|
||||
/lftp-4.6.5.tar.xz
|
||||
/lftp-4.7.0.tar.xz
|
||||
/lftp-4.7.1.tar.xz
|
||||
/lftp-4.7.2.tar.xz
|
||||
/lftp-4.7.3.tar.xz
|
||||
/lftp-4.7.4.tar.xz
|
||||
/lftp-4.7.5.tar.xz
|
||||
/lftp-4.7.6.tar.xz
|
||||
/lftp-4.7.7.tar.xz
|
||||
/lftp-4.8.0.tar.xz
|
||||
/lftp-4.8.1.tar.xz
|
||||
/lftp-4.8.2.tar.xz
|
||||
/lftp-4.8.3.tar.xz
|
||||
/lftp-4.8.4.tar.gz
|
||||
/lftp-4.8.4.tar.xz
|
||||
/lftp-4.9.0.tar.xz
|
||||
/lftp-4.9.1.tar.xz
|
||||
/lftp-4.9.2.tar.xz
|
||||
SOURCES/lftp-4.8.4.tar.xz
|
||||
|
||||
1
.lftp.metadata
Normal file
1
.lftp.metadata
Normal file
@ -0,0 +1 @@
|
||||
fa97429d4376c87dd0b6a9b27ed89184fb2a9149 SOURCES/lftp-4.8.4.tar.xz
|
||||
59
SOURCES/lftp-4.8.4-ssh-prompt.patch
Normal file
59
SOURCES/lftp-4.8.4-ssh-prompt.patch
Normal file
@ -0,0 +1,59 @@
|
||||
From 0ad0732b8fbacd3519b4e3ecf8c394681b314672 Mon Sep 17 00:00:00 2001
|
||||
From: "Alexander V. Lukyanov" <lavv17f@gmail.com>
|
||||
Date: Thu, 5 Dec 2019 21:34:11 +0300
|
||||
Subject: [PATCH] SSH_Access: fixed yes/no/[fingerprint] recognition (fix #547,
|
||||
fix #525)
|
||||
|
||||
---
|
||||
src/SSH_Access.cc | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/SSH_Access.cc b/src/SSH_Access.cc
|
||||
index 97683a3f..adf0c196 100644
|
||||
--- a/src/SSH_Access.cc
|
||||
+++ b/src/SSH_Access.cc
|
||||
@@ -20,6 +20,8 @@
|
||||
#include <config.h>
|
||||
#include "SSH_Access.h"
|
||||
#include "misc.h"
|
||||
+#include <algorithm>
|
||||
+#include "ascii_ctype.h"
|
||||
|
||||
void SSH_Access::MakePtyBuffers()
|
||||
{
|
||||
@@ -70,6 +70,26 @@ static bool IsPasswordPrompt(const char *b,const char *e)
|
||||
return (e-b>=len && !strncasecmp(b,suffix,len));
|
||||
}
|
||||
|
||||
+struct nocase_eq
|
||||
+{
|
||||
+ inline bool operator() (char lhs, char rhs) const
|
||||
+ {
|
||||
+ return c_tolower(lhs) == c_tolower(rhs);
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+static bool contains(char const *begin, char const *end, char const *needle)
|
||||
+{
|
||||
+ return std::search(begin, end, needle, needle+strlen(needle), nocase_eq()) != end;
|
||||
+}
|
||||
+
|
||||
+static bool IsConfirmPrompt(const char *b,const char *e)
|
||||
+{
|
||||
+ if(b==e)
|
||||
+ return false;
|
||||
+ return e[-1]=='?' && contains(b,e,"yes/no");
|
||||
+}
|
||||
+
|
||||
int SSH_Access::HandleSSHMessage()
|
||||
{
|
||||
int m=STALL;
|
||||
@@ -99,7 +106,7 @@ int SSH_Access::HandleSSHMessage()
|
||||
password_sent++;
|
||||
return m;
|
||||
}
|
||||
- if(ends_with(b,b+s,"(yes/no)?"))
|
||||
+ if(IsConfirmPrompt(b,b+s))
|
||||
{
|
||||
const char *answer=QueryBool("auto-confirm",hostname)?"yes\n":"no\n";
|
||||
pty_recv_buf->Put(answer);
|
||||
@ -1,6 +1,6 @@
|
||||
commit 94ee6107a6ff5410666000fdb744aafff3d47af8
|
||||
commit 4156522476192bd9a90aa747cdb8193ffc3a1f24
|
||||
Author: Tomas Korbar <tkorbar@redhat.com>
|
||||
Date: Wed Jul 2 14:00:35 2025 +0200
|
||||
Date: Fri Jul 4 11:15:42 2025 +0200
|
||||
|
||||
Ensure close-notify is sent on end of TLS connection
|
||||
|
||||
@ -106,10 +106,10 @@ index d3cf7f0..8915066 100644
|
||||
#endif
|
||||
|
||||
diff --git a/src/lftp_ssl.cc b/src/lftp_ssl.cc
|
||||
index 89421ee..3507e9c 100644
|
||||
index 0a0078a..19870da 100644
|
||||
--- a/src/lftp_ssl.cc
|
||||
+++ b/src/lftp_ssl.cc
|
||||
@@ -48,6 +48,7 @@ lftp_ssl_base::lftp_ssl_base(int fd1,handshake_mode_t m,const char *h)
|
||||
@@ -45,6 +45,7 @@ lftp_ssl_base::lftp_ssl_base(int fd1,handshake_mode_t m,const char *h)
|
||||
{
|
||||
fd=fd1;
|
||||
handshake_done=false;
|
||||
@ -117,7 +117,7 @@ index 89421ee..3507e9c 100644
|
||||
handshake_mode=m;
|
||||
fatal=false;
|
||||
cert_error=false;
|
||||
@@ -350,10 +351,30 @@ void lftp_ssl_gnutls::load_keys()
|
||||
@@ -347,10 +348,30 @@ void lftp_ssl_gnutls::load_keys()
|
||||
Log::global->Format(9, "Loaded %d CRLs\n", res);
|
||||
gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, cred);
|
||||
}
|
||||
@ -151,7 +151,7 @@ index 89421ee..3507e9c 100644
|
||||
}
|
||||
lftp_ssl_gnutls::~lftp_ssl_gnutls()
|
||||
{
|
||||
@@ -854,10 +875,23 @@ void lftp_ssl_openssl::load_keys()
|
||||
@@ -849,10 +870,23 @@ void lftp_ssl_openssl::load_keys()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -179,10 +179,10 @@ index 89421ee..3507e9c 100644
|
||||
lftp_ssl_openssl::~lftp_ssl_openssl()
|
||||
{
|
||||
diff --git a/src/lftp_ssl.h b/src/lftp_ssl.h
|
||||
index 87b92d4..9b2a615 100644
|
||||
index 17a91b0..8e0cc85 100644
|
||||
--- a/src/lftp_ssl.h
|
||||
+++ b/src/lftp_ssl.h
|
||||
@@ -38,6 +38,7 @@ class lftp_ssl_base
|
||||
@@ -37,6 +37,7 @@ class lftp_ssl_base
|
||||
{
|
||||
public:
|
||||
bool handshake_done;
|
||||
@ -190,7 +190,7 @@ index 87b92d4..9b2a615 100644
|
||||
int fd;
|
||||
xstring_c hostname;
|
||||
enum handshake_mode_t { CLIENT, SERVER } handshake_mode;
|
||||
@@ -108,7 +109,7 @@ public:
|
||||
@@ -107,7 +108,7 @@ public:
|
||||
bool want_out();
|
||||
void copy_sid(const lftp_ssl_gnutls *);
|
||||
void load_keys();
|
||||
@ -199,7 +199,7 @@ index 87b92d4..9b2a615 100644
|
||||
};
|
||||
typedef lftp_ssl_gnutls lftp_ssl;
|
||||
#elif USE_OPENSSL
|
||||
@@ -144,7 +145,7 @@ public:
|
||||
@@ -143,7 +144,7 @@ public:
|
||||
bool want_out();
|
||||
void copy_sid(const lftp_ssl_openssl *);
|
||||
void load_keys();
|
||||
@ -1,26 +1,20 @@
|
||||
Summary: A sophisticated file transfer program
|
||||
Name: lftp
|
||||
Version: 4.9.2
|
||||
Release: 20%{?dist}
|
||||
License: GPL-3.0-or-later
|
||||
Version: 4.8.4
|
||||
Release: 6%{?dist}
|
||||
License: GPLv3+
|
||||
Group: Applications/Internet
|
||||
Source0: http://lftp.yar.ru/ftp/%{name}-%{version}.tar.xz
|
||||
URL: http://lftp.yar.ru/
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: gnutls-devel
|
||||
BuildRequires: perl-generators
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: gettext
|
||||
BuildRequires: zlib-devel, gcc-c++
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: ncurses-devel, gnutls-devel, perl-generators, pkgconfig, readline-devel, gettext
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: make
|
||||
|
||||
Patch1: lftp-4.0.9-date_fmt.patch
|
||||
Patch2: lftp-4.9.2-cdefs.patch
|
||||
Patch3: lftp-4.9.2-gnutls-peers2.patch
|
||||
Patch4: lftp-4.9.2-fedora-c99.patch
|
||||
Patch5: lftp-4.9.2-tls-close.patch
|
||||
Patch6: lftp-4.9.2-tls-close-timer.patch
|
||||
Patch2: lftp-4.8.4-ssh-prompt.patch
|
||||
Patch3: lftp-4.8.4-re-newed-cert.patch
|
||||
Patch4: lftp-4.8.4-tls-close.patch
|
||||
|
||||
%description
|
||||
LFTP is a sophisticated ftp/http file transfer program. Like bash, it has job
|
||||
@ -28,21 +22,22 @@ control and uses the readline library for input. It has bookmarks, built-in
|
||||
mirroring, and can transfer several files in parallel. It is designed with
|
||||
reliability in mind.
|
||||
|
||||
%package scripts
|
||||
Summary: Scripts for lftp
|
||||
Group: Applications/Internet
|
||||
Requires: lftp >= %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
|
||||
%description scripts
|
||||
Utility scripts for use with lftp.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%patch1 -p1 -b .date_fmt
|
||||
%ifarch ppc64le
|
||||
%patch 2 -p1 -b .cdefs
|
||||
%endif
|
||||
%patch 3 -p1 -b .gnutls-peers2
|
||||
|
||||
%patch 4 -p1 -b .fedora-c99
|
||||
%patch 5 -p1 -b .tls-close
|
||||
%patch 6 -p1 -b .tlc-close-timer
|
||||
|
||||
# Avoid trying to re-run autoconf
|
||||
touch -r aclocal.m4 configure m4/needtrio.m4
|
||||
%patch2 -p1 -b .ssh-prompt
|
||||
%patch3 -p1 -b .re-newed-cert
|
||||
%patch4 -p1 -b .tls-close
|
||||
|
||||
#sed -i.rpath -e '/lftp_cv_openssl/s|-R.*lib||' configure
|
||||
sed -i.norpath -e \
|
||||
@ -71,19 +66,22 @@ rm $RPM_BUILD_ROOT%{_libdir}/liblftp-tasks.so
|
||||
desktop-file-install \
|
||||
--dir=%{buildroot}%{_datadir}/applications \
|
||||
%{buildroot}/%{_datadir}/applications/lftp.desktop
|
||||
rm -r $RPM_BUILD_ROOT%{_datadir}/lftp
|
||||
|
||||
%find_lang %{name}
|
||||
|
||||
%ldconfig_scriptlets
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files -f %{name}.lang
|
||||
%defattr(-,root,root,-)
|
||||
%doc BUGS COPYING ChangeLog FAQ FEATURES README* NEWS THANKS TODO
|
||||
%config(noreplace) %{_sysconfdir}/lftp.conf
|
||||
%{_bindir}/lftp
|
||||
%{_bindir}/lftpget
|
||||
%{_mandir}/man1/lftp*.1*
|
||||
%{_mandir}/man5/lftp.conf.5*
|
||||
%{_bindir}/*
|
||||
%{_mandir}/*/*
|
||||
%dir %{_libdir}/lftp
|
||||
%dir %{_libdir}/lftp/%{version}
|
||||
%{_libdir}/lftp/%{version}/cmd-torrent.so
|
||||
@ -101,102 +99,35 @@ rm -r $RPM_BUILD_ROOT%{_datadir}/lftp
|
||||
%{_datadir}/applications/lftp.desktop
|
||||
%{_datadir}/icons/hicolor/*/apps/*
|
||||
|
||||
|
||||
|
||||
%files scripts
|
||||
%defattr(-,root,root,-)
|
||||
%{_datadir}/lftp
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Oct 02 2025 Michal Ruprich <mruprich@redhat.com> - 4.9.2-20
|
||||
- Adding a timeout for TLS close
|
||||
- Resolves: RHEL-113472 - "cannot seek on data source" in TLS lftp sessions
|
||||
|
||||
* Wed Jul 02 2025 Tomas Korbar <tkorbar@redhat.com> - 4.9.2-19
|
||||
* Fri Jul 04 2025 Tomas Korbar <tkorbar@redhat.com> - 4.8.4-6
|
||||
- Do not wait for server close-notify on TLS close
|
||||
- Resolves: RHEL-100407
|
||||
- Resolves: RHEL-99571
|
||||
|
||||
* Thu Jun 26 2025 Tomas Korbar <tkorbar@redhat.com> - 4.9.2-18
|
||||
- Improve fix for RHEL-91005
|
||||
- Resolves: RHEL-91005
|
||||
* Thu Jun 26 2025 Tomas Korbar <tkorbar@redhat.com> - 4.8.4-5
|
||||
- Improve fix for close of TLS connection
|
||||
- Resolves: RHEL-99571
|
||||
|
||||
* Tue May 06 2025 Tomas Korbar <tkorbar@redhat.com> - 4.9.2-17
|
||||
* Tue May 06 2025 Tomas Korbar <tkorbar@redhat.com> - 4.8.4-4
|
||||
- Ensure proper closing of TLS connection
|
||||
- Resolves: RHEL-91005
|
||||
- Resolves: RHEL-88955
|
||||
|
||||
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 4.9.2-16
|
||||
- Bump release for October 2024 mass rebuild:
|
||||
Resolves: RHEL-64018
|
||||
* Mon Jul 24 2023 Michal Ruprich <mruprich@redhat.com> - 4.8.4-3
|
||||
- Resolves: #2182418 - Connection to site fails with certificate verification error
|
||||
|
||||
* Tue Jul 23 2024 Michal Ruprich <mruprich@redhat.com> - 4.9.2-15
|
||||
- Removing lftp-scripts
|
||||
|
||||
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 4.9.2-14
|
||||
- Bump release for June 2024 mass rebuild
|
||||
|
||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.9.2-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.9.2-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.9.2-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Thu Mar 16 2023 Michal Ruprich <mruprich@redhat.com> - 4.9.2-10
|
||||
- SPDX migration
|
||||
|
||||
* Wed Feb 8 2023 DJ Delorie <dj@redhat.com> - 4.9.2-9
|
||||
- Fix C99 compatibility issue
|
||||
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.9.2-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Wed Sep 07 2022 Michal Ruprich <mruprich@redhat.com> - 4.9.2-7
|
||||
- Resolves: #2107872 - lftp fails to verify Let's Encrypt certificates
|
||||
|
||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.9.2-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Mon Feb 07 2022 Michal Ruprich <mruprich@redhat.com> - 4.9.2-5
|
||||
- Fix for FTBFS(rhbz#2045780)
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.9.2-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.9.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.9.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Wed Aug 19 2020 Michal Ruprich <michalruprich@gmail.com> - 4.9.2-1
|
||||
- New version 4.9.2
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.9.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Fri Apr 03 2020 Michal Ruprich <michalruprich@gmail.com> - 4.9.1-1
|
||||
- New version 4.9.1
|
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.9.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Fri Jan 03 2020 Michal Ruprich <mruprich@redhat.com> - 4.9.0-1
|
||||
- New version 4.9.0
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.4-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.8.4-3
|
||||
- Rebuild for readline 8.0
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.4-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
* Tue Apr 28 2020 Michal Ruprich <michalruprich@gmail.com> - 4.8.4-2
|
||||
- Resolves: #1793557 - SFTP over LFTP hangs if host key of the remote system doesn't exist
|
||||
|
||||
* Wed Aug 01 2018 Michal Ruprich <mruprich@redhat.com> - 4.8.4-1
|
||||
- New version 4.8.4
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.3-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Thu Apr 26 2018 Tomas Hozza <thozza@redhat.com> - 4.8.3-3
|
||||
- Added gcc-c++ as an explicit BuildRequires
|
||||
|
||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
25
gating.yaml
25
gating.yaml
@ -1,25 +0,0 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_testing
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/tier1-public.functional}
|
||||
|
||||
#Rawhide
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_stable
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/tier1-public.functional}
|
||||
|
||||
#gating rhel
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-*
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-public.functional}
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-internal.functional}
|
||||
@ -1,13 +0,0 @@
|
||||
diff --git a/lib/libc-config.h.old b/lib/libc-config.h
|
||||
index 1300c3a..7537bab 100644
|
||||
--- a/lib/libc-config.h.old
|
||||
+++ b/lib/libc-config.h
|
||||
@@ -156,7 +156,7 @@
|
||||
#undef __warndecl
|
||||
|
||||
/* Include our copy of glibc <sys/cdefs.h>. */
|
||||
-#include <cdefs.h>
|
||||
+#include <sys/cdefs.h>
|
||||
|
||||
/* <cdefs.h> __inline is too pessimistic for non-GCC. */
|
||||
#undef __inline
|
||||
@ -1,22 +0,0 @@
|
||||
diff -rup a/configure b/configure
|
||||
--- a/configure 2023-02-08 21:27:48.733647760 -0500
|
||||
+++ b/configure 2023-02-08 21:28:31.201222024 -0500
|
||||
@@ -57429,6 +57429,7 @@ else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
+ #include <stdio.h>
|
||||
int main()
|
||||
{
|
||||
unsigned long long x=0,x1;
|
||||
diff -rup a/m4/needtrio.m4 b/m4/needtrio.m4
|
||||
--- a/m4/needtrio.m4 2016-02-20 08:57:52.000000000 -0500
|
||||
+++ b/m4/needtrio.m4 2023-02-08 21:28:13.642571126 -0500
|
||||
@@ -9,6 +9,7 @@ AC_DEFUN([LFTP_NEED_TRIO],[
|
||||
else
|
||||
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
+ #include <stdio.h>
|
||||
int main()
|
||||
{
|
||||
unsigned long long x=0,x1;
|
||||
@ -1,126 +0,0 @@
|
||||
From 2784cae1d18370acdc13f2bf660c59cd15764d7b Mon Sep 17 00:00:00 2001
|
||||
From: Michal Ruprich <mruprich@redhat.com>
|
||||
Date: Thu, 25 Sep 2025 17:28:54 +0200
|
||||
Subject: [PATCH] Improving TLS communication with a timer
|
||||
|
||||
---
|
||||
src/buffer_ssl.h | 1 +
|
||||
src/ftpclass.cc | 4 +++-
|
||||
src/lftp_ssl.cc | 20 +++++++++++++++-----
|
||||
src/lftp_ssl.h | 2 ++
|
||||
src/network.cc | 5 +++++
|
||||
src/network.h | 1 +
|
||||
6 files changed, 27 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/buffer_ssl.h b/src/buffer_ssl.h
|
||||
index 8915066dc..51080b268 100644
|
||||
--- a/src/buffer_ssl.h
|
||||
+++ b/src/buffer_ssl.h
|
||||
@@ -21,6 +21,7 @@
|
||||
#define BUFFER_SSL_H
|
||||
|
||||
#include "buffer.h"
|
||||
+#include "Timer.h"
|
||||
|
||||
#if USE_SSL
|
||||
#include "lftp_ssl.h"
|
||||
diff --git a/src/ftpclass.cc b/src/ftpclass.cc
|
||||
index eb5d0186b..0321a1347 100644
|
||||
--- a/src/ftpclass.cc
|
||||
+++ b/src/ftpclass.cc
|
||||
@@ -4872,8 +4872,10 @@ void Ftp::Reconfig(const char *name)
|
||||
|
||||
if(conn && conn->control_sock!=-1)
|
||||
SetSocketBuffer(conn->control_sock);
|
||||
- if(conn && conn->data_sock!=-1)
|
||||
+ if(conn && conn->data_sock!=-1) {
|
||||
SetSocketBuffer(conn->data_sock);
|
||||
+ SetTCPNodelay(conn->data_sock);
|
||||
+ }
|
||||
if(conn && conn->data_iobuf && rate_limit)
|
||||
rate_limit->SetBufferSize(conn->data_iobuf,max_buf);
|
||||
}
|
||||
diff --git a/src/lftp_ssl.cc b/src/lftp_ssl.cc
|
||||
index f53edf249..74f3e390e 100644
|
||||
--- a/src/lftp_ssl.cc
|
||||
+++ b/src/lftp_ssl.cc
|
||||
@@ -356,16 +356,26 @@ int lftp_ssl_gnutls::shutdown()
|
||||
{
|
||||
int res;
|
||||
if(handshake_done) {
|
||||
+ // Certain SSL implementations do not reply us with
|
||||
+ // close_notify that is why we must not wait for it
|
||||
+ // indefinetely
|
||||
+ if (ssl_shutdown_timer && ssl_shutdown_timer->Stopped()) {
|
||||
+ Log::global->Format(9,"TLS Timer ran out, considering channel closed\n");
|
||||
+ goodbye_done = true;
|
||||
+ return DONE;
|
||||
+ }
|
||||
res = gnutls_bye(session,GNUTLS_SHUT_RDWR);
|
||||
if (res == GNUTLS_E_SUCCESS) {
|
||||
+ if (ssl_shutdown_timer) {
|
||||
+ ssl_shutdown_timer->Stop();
|
||||
+ Log::global->Format(9,"Stopping TLS close timer\n");
|
||||
+ }
|
||||
goodbye_done = true;
|
||||
return DONE;
|
||||
} else if (res == GNUTLS_E_AGAIN || res == GNUTLS_E_INTERRUPTED) {
|
||||
- /* In ideal world we would not need this if, but windows does not
|
||||
- * send close-notify, so do not wait on server close-notify */
|
||||
- if (gnutls_record_get_direction(session) == 0) {
|
||||
- goodbye_done = true;
|
||||
- return DONE;
|
||||
+ if (!ssl_shutdown_timer) {
|
||||
+ ssl_shutdown_timer = new Timer(0, 200);
|
||||
+ Log::global->Format(9,"Starting TLS close timer\n");
|
||||
}
|
||||
return RETRY;
|
||||
}
|
||||
diff --git a/src/lftp_ssl.h b/src/lftp_ssl.h
|
||||
index 9b2a615fb..c8492e45f 100644
|
||||
--- a/src/lftp_ssl.h
|
||||
+++ b/src/lftp_ssl.h
|
||||
@@ -33,6 +33,7 @@
|
||||
|
||||
#include "Ref.h"
|
||||
#include "xstring.h"
|
||||
+#include "Timer.h"
|
||||
|
||||
class lftp_ssl_base
|
||||
{
|
||||
@@ -92,6 +93,7 @@ class lftp_ssl_gnutls : public lftp_ssl_base
|
||||
static Ref<lftp_ssl_gnutls_instance> instance;
|
||||
gnutls_session_t session;
|
||||
gnutls_certificate_credentials_t cred;
|
||||
+ Ref<Timer> ssl_shutdown_timer;
|
||||
void verify_certificate_chain(const gnutls_datum_t *cert_chain,int cert_chain_length);
|
||||
int do_handshake();
|
||||
bool check_fatal(int res);
|
||||
diff --git a/src/network.cc b/src/network.cc
|
||||
index cf26089eb..454e6609a 100644
|
||||
--- a/src/network.cc
|
||||
+++ b/src/network.cc
|
||||
@@ -264,6 +264,11 @@ void Networker::SetSocketMaxseg(int sock,int socket_maxseg)
|
||||
ProtoLog::LogError(1,"setsockopt(TCP_MAXSEG,%d): %s",socket_maxseg,strerror(errno));
|
||||
#endif
|
||||
}
|
||||
+void Networker::SetTCPNodelay(int sock)
|
||||
+{
|
||||
+ if(-1==setsockopt(sock, SOL_TCP, TCP_NODELAY, &one, sizeof(one)))
|
||||
+ ProtoLog::LogError(1,"setsockopt(TCP_NODELAY): %s", strerror(errno));
|
||||
+}
|
||||
|
||||
int Networker::SocketCreateUnbound(int af,int type,int proto,const char *hostname)
|
||||
{
|
||||
diff --git a/src/network.h b/src/network.h
|
||||
index 10d99227d..0e84edb99 100644
|
||||
--- a/src/network.h
|
||||
+++ b/src/network.h
|
||||
@@ -132,6 +132,7 @@ class Networker
|
||||
static int SocketAccept(int fd,sockaddr_u *u,const char *hostname=0);
|
||||
static void SetSocketBuffer(int sock,int socket_buffer);
|
||||
static void SetSocketMaxseg(int sock,int socket_maxseg);
|
||||
+ static void SetTCPNodelay(int sock);
|
||||
static void SocketBindStd(int s,int af,const char *hostname,int port=0);
|
||||
static int SocketCreate(int af,int type,int proto,const char *hostname);
|
||||
static void SocketTuneTCP(int s,const char *hostname);
|
||||
36
plans.fmf
36
plans.fmf
@ -1,36 +0,0 @@
|
||||
/tier1-internal:
|
||||
plan:
|
||||
import:
|
||||
url: https://gitlab.com/redhat/centos-stream/tests/lftp.git
|
||||
name: /plans/tier1/internal
|
||||
|
||||
/tier1-public:
|
||||
plan:
|
||||
import:
|
||||
url: https://gitlab.com/redhat/centos-stream/tests/lftp.git
|
||||
name: /plans/tier1/public
|
||||
|
||||
/tier2-tier3-internal:
|
||||
plan:
|
||||
import:
|
||||
url: https://gitlab.com/redhat/centos-stream/tests/lftp.git
|
||||
name: /plans/tier2-tier3/internal
|
||||
|
||||
/tier2-tier3-public:
|
||||
plan:
|
||||
import:
|
||||
url: https://gitlab.com/redhat/centos-stream/tests/lftp.git
|
||||
name: /plans/tier2-tier3/public
|
||||
|
||||
/others-internal:
|
||||
plan:
|
||||
import:
|
||||
url: https://gitlab.com/redhat/centos-stream/tests/lftp.git
|
||||
name: /plans/others/internal
|
||||
|
||||
/others-public:
|
||||
plan:
|
||||
import:
|
||||
url: https://gitlab.com/redhat/centos-stream/tests/lftp.git
|
||||
name: /plans/others/public
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
---
|
||||
inspections:
|
||||
badfuncs: off
|
||||
Loading…
Reference in New Issue
Block a user