pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_install/files/lib Merge 1.75 of lib/ftpio...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5704f988fbce
branches:  trunk
changeset: 530937:5704f988fbce
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Sat Jul 14 22:57:15 2007 +0000

description:
Merge 1.75 of lib/ftpio.c from NetBSD:

When fixing vsftpd, other FTP server were broken as they return
different error codes for unmatching glob patterns. Basically ignore the
error code and just try the other pattern. chdir errors are still
considered fatal.

Bump version to 20070715.

diffstat:

 pkgtools/pkg_install/files/lib/ftpio.c   |  18 ++++++++----------
 pkgtools/pkg_install/files/lib/version.h |   4 ++--
 2 files changed, 10 insertions(+), 12 deletions(-)

diffs (70 lines):

diff -r 007ffec67bd3 -r 5704f988fbce pkgtools/pkg_install/files/lib/ftpio.c
--- a/pkgtools/pkg_install/files/lib/ftpio.c    Sat Jul 14 22:36:25 2007 +0000
+++ b/pkgtools/pkg_install/files/lib/ftpio.c    Sat Jul 14 22:57:15 2007 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ftpio.c,v 1.21 2007/04/16 12:55:35 joerg Exp $ */
+/*     $NetBSD: ftpio.c,v 1.22 2007/07/14 22:57:15 joerg Exp $ */
 
 #if HAVE_CONFIG_H
 #include "config.h"
@@ -8,7 +8,7 @@
 #include <sys/cdefs.h>
 #endif
 #ifndef lint
-__RCSID("$NetBSD: ftpio.c,v 1.21 2007/04/16 12:55:35 joerg Exp $");
+__RCSID("$NetBSD: ftpio.c,v 1.22 2007/07/14 22:57:15 joerg Exp $");
 #endif
 
 /*-
@@ -655,7 +655,7 @@
        char *s, buf[MaxPathSize];
        char tmpname[MaxPathSize];
        char best[MaxPathSize];
-       int rc, tfd, retry_tbz;
+       int rc, got_list, tfd, retry_tbz;
 
        retry_tbz = 0;
        best[0]='\0';
@@ -700,12 +700,10 @@
        }
 
        rc = ftp_cmd(buf, "\n(550|450|226).*\n"); /* catch errors */
-       if (rc != 226) {
-               if (Verbose)
-                       warnx("nlist failed!");
-               unlink(tmpname);        /* remove clutter */
-               return NULL;
-       }
+       if (rc != 226)
+               got_list = 0;
+       else
+               got_list = 1;
 
        /* Sync - don't remove */
        rc = ftp_cmd("cd .\n", "\n(550|250|257).*\n");
@@ -715,7 +713,7 @@
                return NULL;
        }
        
-       if (access(tmpname, R_OK)==0) {
+       if (got_list == 1 && access(tmpname, R_OK)==0) {
                int matches;
                FILE *f;
                char filename[MaxPathSize];
diff -r 007ffec67bd3 -r 5704f988fbce pkgtools/pkg_install/files/lib/version.h
--- a/pkgtools/pkg_install/files/lib/version.h  Sat Jul 14 22:36:25 2007 +0000
+++ b/pkgtools/pkg_install/files/lib/version.h  Sat Jul 14 22:57:15 2007 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: version.h,v 1.66 2007/07/14 20:19:48 adrianp Exp $     */
+/*     $NetBSD: version.h,v 1.67 2007/07/14 22:57:15 joerg Exp $       */
 
 /*
  * Copyright (c) 2001 Thomas Klausner.  All rights reserved.
@@ -33,6 +33,6 @@
 #ifndef _INST_LIB_VERSION_H_
 #define _INST_LIB_VERSION_H_
 
-#define PKGTOOLS_VERSION "20070714"
+#define PKGTOOLS_VERSION "20070715"
 
 #endif /* _INST_LIB_VERSION_H_ */



Home | Main Index | Thread Index | Old Index