From 451e44f944c50a3e636e11e6ab18280c257dedeb Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Fri, 12 Nov 2010 15:08:47 +0100 Subject: [PATCH] ftp: fix for #650255, not yet applied upstream - do not send QUIT to a dead FTP control connection (#650255) - pull back glibc's implementation of str[n]casecmp(), #626470 appears fixed --- ...55.patch => 0003-curl-7.21.2-12b2412.patch | 0 0004-curl-7.21.2-bz650255.patch | 19 +++++++++++++++ curl.spec | 24 +++++++++---------- 3 files changed, 31 insertions(+), 12 deletions(-) rename 0003-curl-7.21.2-bz650255.patch => 0003-curl-7.21.2-12b2412.patch (100%) create mode 100644 0004-curl-7.21.2-bz650255.patch diff --git a/0003-curl-7.21.2-bz650255.patch b/0003-curl-7.21.2-12b2412.patch similarity index 100% rename from 0003-curl-7.21.2-bz650255.patch rename to 0003-curl-7.21.2-12b2412.patch diff --git a/0004-curl-7.21.2-bz650255.patch b/0004-curl-7.21.2-bz650255.patch new file mode 100644 index 0000000..2609a26 --- /dev/null +++ b/0004-curl-7.21.2-bz650255.patch @@ -0,0 +1,19 @@ + lib/url.c | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/lib/url.c b/lib/url.c +index 1b65a92..4e2bce6 100644 +--- a/lib/url.c ++++ b/lib/url.c +@@ -2886,6 +2886,11 @@ ConnectionExists(struct SessionHandle *data, + check->data = data; + infof(data, "Connection #%ld seems to be dead!\n", i); + ++ if(check->protocol & PROT_FTP) ++ /* FTP: avoid sending QUIT and waiting for response on a dead ++ * connection */ ++ check->proto.ftpc.ctl_valid = FALSE; ++ + Curl_disconnect(check); /* disconnect resources */ + data->state.connc->connects[i]=NULL; /* nothing here */ + diff --git a/curl.spec b/curl.spec index 92f07c3..d8e64c1 100644 --- a/curl.spec +++ b/curl.spec @@ -1,7 +1,7 @@ Summary: A utility for getting files from remote servers (FTP, HTTP, and others) Name: curl Version: 7.21.2 -Release: 4%{?dist} +Release: 5%{?dist} License: MIT Group: Applications/Internet Source: http://curl.haxx.se/download/%{name}-%{version}.tar.lzma @@ -16,7 +16,10 @@ Patch2: 0002-curl-7.21.2-c6b97a8.patch # return more appropriate error code in case FTP server session idle # timeout has exceeded (#650255) -Patch3: 0003-curl-7.21.2-bz650255.patch +Patch3: 0003-curl-7.21.2-12b2412.patch + +# do not send QUIT to a dead FTP control connection (#650255) +Patch4: 0004-curl-7.21.2-bz650255.patch # patch making libcurl multilib ready Patch101: 0101-curl-7.21.1-multilib.patch @@ -118,6 +121,9 @@ done %patch2 -p1 %patch3 -p1 +# upstream patches (not yet applied) +%patch4 -p1 + # Fedora patches %patch101 -p1 %patch102 -p1 @@ -146,16 +152,6 @@ sed -i s/899\\\([0-9]\\\)/%{?__isa_bits}9\\1/ tests/data/test* # --enable-debug # use ^^^ to turn off optimizations, etc. -# either glibc's implementation of strcasecmp() or its interpretation -# by valgrind seems to be broken on x86_64 (#626470), the same problem -# appeared with strncasecmp() a while later (#631449) -%ifarch x86_64 -sed -i \ - -e 's/HAVE_STRCASECMP/HAVE_BROKEN_STRCASECMP/' \ - -e 's/HAVE_STRNCASECMP/HAVE_BROKEN_STRNCASECMP/' \ - lib/curl_config.h -%endif - # Remove bogus rpath sed -i \ -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ @@ -238,6 +234,10 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/aclocal/libcurl.m4 %changelog +* Fri Nov 12 2010 Kamil Dudka 7.21.2-5 +- do not send QUIT to a dead FTP control connection (#650255) +- pull back glibc's implementation of str[n]casecmp(), #626470 appears fixed + * Tue Nov 09 2010 Kamil Dudka 7.21.2-4 - prevent FTP client from hanging on unrecognized ABOR response (#649347) - return more appropriate error code in case FTP server session idle