소스 검색

unbreak FTP login on sites who do not require a PASS command at all (and even choke if one is sent without request). This allows cURL 7.16.4 to again download from ftp.gnu.org. cURL 7.16.3 BTW was still ok, the bug was introduced in 7.16.3. Upstream vendor will be notified, too

Ralf S. Engelschall 18 년 전
부모
커밋
09dffed7d2
2개의 변경된 파일16개의 추가작업 그리고 1개의 파일을 삭제
  1. 13 0
      curl/curl.patch
  2. 3 1
      curl/curl.spec

+ 13 - 0
curl/curl.patch

@@ -0,0 +1,13 @@
+Index: lib/ftp.c
+--- lib/ftp.c.orig	2007-07-02 00:01:19 +0200
++++ lib/ftp.c	2007-07-20 09:20:11 +0200
+@@ -2371,8 +2371,7 @@
+   struct ftp_conn *ftpc = &conn->proto.ftpc;
+   (void)instate; /* no use for this yet */
+ 
+-  /* some need password anyway, and others just return 2xx ignored */
+-  if((ftpcode == 331 || ftpcode/100 == 2) && (ftpc->state == FTP_USER)) {
++  if((ftpcode == 331) && (ftpc->state == FTP_USER)) {
+     /* 331 Password required for ...
+        (the server requires to send the user's password too) */
+     NBFTPSENDF(conn, "PASS %s", ftp->passwd?ftp->passwd:"");

+ 3 - 1
curl/curl.spec

@@ -33,7 +33,7 @@ Class:        BASE
 Group:        Web
 License:      MIT-style
 Version:      7.16.4
-Release:      20070711
+Release:      20070720
 
 #   package options
 %option       with_ssl       yes
@@ -44,6 +44,7 @@ Release:      20070711
 
 #   list of sources
 Source0:      http://curl.haxx.se/download/curl-%{version}.tar.bz2
+Patch0:       curl.patch
 
 #   build information
 Prefix:       %{l_prefix}
@@ -89,6 +90,7 @@ AutoReqProv:  no
 
 %prep
     %setup -q
+    %patch -p0
 
 %build
     %{l_shtool} subst \