Your message dated Thu, 21 Jul 2016 16:00:10 +0000
with message-id <[email protected]>
and subject line Bug#24429: fixed in ftplib 4.0-1-1
has caused the Debian Bug report #24429,
regarding ftplib prints perror msgs, and should check ftplib_debug first
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
24429: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=24429
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ftplib3
Version: 3.1-1
Severity: normal

While writing a replacement ftp method for apt-get, and doing some testing, I
changed the server to something non-existant.  When ftplib tried to connect,
it printed 'gethostbyname: success,' which will mess apt-get up(or at least
cause confusion).  The attached patch will only print perror() msgs when
ftplib_debug > 1.

Adam

--- ftplib.c.orig       Tue Jun 23 15:39:52 1998
+++ ftplib.c    Sat Jul 11 00:53:38 1998
@@ -238,7 +238,7 @@
            return retval;
        if ((x = net_read(ctl->handle,ctl->cput,ctl->cleft)) == -1)
        {
-           perror("read");
+           if(ftplib_debug > 1) perror("read");
            retval = -1;
            break;
        }
@@ -323,7 +323,7 @@
     char match[5];
     if (readline(nControl->response,256,nControl) == -1)
     {
-       perror("Control socket read failed");
+       if(ftplib_debug > 1) perror("Control socket read failed");
        return 0;
     }
     if (ftplib_debug > 1)
@@ -337,7 +337,7 @@
        {
            if (readline(nControl->response,256,nControl) == -1)
            {
-               perror("Control socket read failed");
+               if(ftplib_debug > 1) perror("Control socket read failed");
                return 0;
            }
            if (ftplib_debug > 1)
@@ -402,7 +402,7 @@
 #else
        if ((pse = getservbyname("ftp","tcp")) == NULL)
        {
-           perror("getservbyname");
+           if(ftplib_debug > 1) perror("getservbyname");
            return 0;
        }
        sin.sin_port = pse->s_port;
@@ -423,7 +423,7 @@
     {
        if ((phe = gethostbyname(lhost)) == NULL)
        {
-           perror("gethostbyname");
+           if(ftplib_debug > 1) perror("gethostbyname");
            return 0;
        }
        memcpy((char *)&sin.sin_addr, phe->h_addr, phe->h_length);
@@ -432,33 +432,33 @@
     sControl = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
     if (sControl == -1)
     {
-       perror("socket");
+       if(ftplib_debug > 1) perror("socket");
        return 0;
     }
     if (setsockopt(sControl,SOL_SOCKET,SO_REUSEADDR,
                   SETSOCKOPT_OPTVAL_TYPE &on, sizeof(on)) == -1)
     {
-       perror("setsockopt");
+       if(ftplib_debug > 1) perror("setsockopt");
        net_close(sControl);
        return 0;
     }
     if (connect(sControl, (struct sockaddr *)&sin, sizeof(sin)) == -1)
     {
-       perror("connect");
+       if(ftplib_debug > 1) perror("connect");
        net_close(sControl);
        return 0;
     }
     ctrl = calloc(1,sizeof(netbuf));
     if (ctrl == NULL)
     {
-       perror("calloc");
+       if(ftplib_debug > 1) perror("calloc");
        net_close(sControl);
        return 0;
     }
     ctrl->buf = malloc(FTPLIB_BUFSIZ);
     if (ctrl->buf == NULL)
     {
-       perror("calloc");
+       if(ftplib_debug > 1) perror("calloc");
        net_close(sControl);
        free(ctrl);
        return 0;
@@ -541,7 +541,7 @@
     sprintf(buf,"%s\r\n",cmd);
     if (net_write(nControl->handle,buf,strlen(buf)) <= 0)
     {
-       perror("write");
+       if(ftplib_debug > 1) perror("write");
        return 0;
     }
     return readresp(expresp, nControl);
@@ -625,27 +625,27 @@
     {
        if (getsockname(nControl->handle, &sin.sa, &l) < 0)
        {
-           perror("getsockname");
+           if(ftplib_debug > 1) perror("getsockname");
            return 0;
        }
     }
     sData = socket(PF_INET,SOCK_STREAM,IPPROTO_TCP);
     if (sData == -1)
     {
-       perror("socket");
+       if(ftplib_debug > 1) perror("socket");
        return -1;
     }
     if (setsockopt(sData,SOL_SOCKET,SO_REUSEADDR,
                   SETSOCKOPT_OPTVAL_TYPE &on,sizeof(on)) == -1)
     {
-       perror("setsockopt");
+       if(ftplib_debug > 1) perror("setsockopt");
        net_close(sData);
        return -1;
     }
     if (setsockopt(sData,SOL_SOCKET,SO_LINGER,
                   SETSOCKOPT_OPTVAL_TYPE &lng,sizeof(lng)) == -1)
     {
-       perror("setsockopt");
+       if(ftplib_debug > 1) perror("setsockopt");
        net_close(sData);
        return -1;
     }
@@ -653,7 +653,7 @@
     {
        if (connect(sData, &sin.sa, sizeof(sin.sa)) == -1)
        {
-           perror("connect");
+           if(ftplib_debug > 1) perror("connect");
            net_close(sData);
            return -1;
        }
@@ -663,13 +663,13 @@
        sin.in.sin_port = 0;
        if (bind(sData, &sin.sa, sizeof(sin)) == -1)
        {
-           perror("bind");
+           if(ftplib_debug > 1) perror("bind");
            net_close(sData);
            return 0;
        }
        if (listen(sData, 1) < 0)
        {
-           perror("listen");
+           if(ftplib_debug > 1) perror("listen");
            net_close(sData);
            return 0;
        }
@@ -691,13 +691,13 @@
     ctrl = calloc(1,sizeof(netbuf));
     if (ctrl == NULL)
     {
-       perror("calloc");
+       if(ftplib_debug > 1) perror("calloc");
        net_close(sData);
        return -1;
     }
     if ((mode == 'A') && ((ctrl->buf = malloc(FTPLIB_BUFSIZ)) == NULL))
     {
-       perror("calloc");
+       if(ftplib_debug > 1) perror("calloc");
        net_close(sData);
        free(ctrl);
        return -1;
@@ -1104,7 +1104,7 @@
        while ((l = FtpRead(dbuf, FTPLIB_BUFSIZ, nData)) > 0)
            if (fwrite(dbuf, 1, l, local) <= 0)
            {
-               perror("localfile write");
+               if(ftplib_debug > 1) perror("localfile write");
                break;
            }
     }
---



--- End Message ---
--- Begin Message ---
Source: ftplib
Source-Version: 4.0-1-1

We believe that the bug you reported is fixed in the latest version of
ftplib, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Raphaël Hertzog <[email protected]> (supplier of updated ftplib package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 21 Jul 2016 12:17:12 +0200
Source: ftplib
Binary: libftp4 libftp-dev
Architecture: source amd64
Version: 4.0-1-1
Distribution: experimental
Urgency: low
Maintainer: Raphaël Hertzog <[email protected]>
Changed-By: Raphaël Hertzog <[email protected]>
Description:
 libftp-dev - Library of callable ftp routines (development)
 libftp4    - Library of callable ftp routines
Closes: 24429 831645
Changes:
 ftplib (4.0-1-1) experimental; urgency=low
 .
   * New upstream release.
     - Dropped debian/patches/check-getservbyname-failure
     - Refreshed debian/patches/fix-ascii-read-without-eol
     - All perror calls are now protected with "if (ftplib_debug)".
       Closes: #24429
     - License changed to Artistic-2.0.
   * Rename ftplib3 into libftp4 for SONAME bump.
   * Rename ftplib-dev into libftp-dev (with "Provides: ftplib-dev" to not break
     existing packages, and Replaces for smooth upgrade).
   * Drop debian-generated manual pages as debian/html2man.py no longer copes
     with the updated documentation. Keep only the HTML documentation.
     This also helps to make the build reproducible. Closes: #831645
   * Use ${misc:Pre-Depends} instead of hardcoding multiarch-support.
   * Update Vcs-* fields to use https.
   * Update symbols file:
     - DefaultNetbuf has been dropped
     - FtpSetCallback/FtpClearCallback have been added
     - net_read/net_write have been added (although they are
       likely private symbols)
   * Switch debhelper compat to 9.
   * Patch upstream Makefile to pass CFLAGS/CPPFLAGS/LDFLAGS (for proper
     hardening support).
   * Bump Standards-Version to 3.9.8.
Checksums-Sha1:
 5889d10816afd77cc845d0a636d6f656cc9021a1 1534 ftplib_4.0-1-1.dsc
 91956556bfb3167ee87baad5ce0076f7dfdf72f3 66896 ftplib_4.0-1.orig.tar.gz
 45821817cf4f25fab9cdedf76d676ace7c44c1a7 9412 ftplib_4.0-1-1.debian.tar.xz
 e55fd0103b03c81029710b123eea9870b9c1ed72 10412 
libftp-dev-dbgsym_4.0-1-1_amd64.deb
 481c385e52ee19504d776d9f5cc355ab861d1866 37638 libftp-dev_4.0-1-1_amd64.deb
 85f8fa5727937b59e9bbe7ec278b32e375ebfff3 20358 libftp4-dbgsym_4.0-1-1_amd64.deb
 242ecc3d3549752fd68559c5fdca8cab242357af 20638 libftp4_4.0-1-1_amd64.deb
Checksums-Sha256:
 749eb11b6eb306da3ec3165570793dd0ee1b40499be3bf6895a128b143589568 1534 
ftplib_4.0-1-1.dsc
 9b1e8e2aee2f0798c8399378dd6c2f5e9138017259aa18f18070cdf76b191d8e 66896 
ftplib_4.0-1.orig.tar.gz
 5162a59e1834dc8167c5183a60d4e6ba0008daeba0200967187cd3ba0604b66a 9412 
ftplib_4.0-1-1.debian.tar.xz
 415e5a528301a50ea4862dbf51e654b7608f71769f5978d0788cc0784a9a8adc 10412 
libftp-dev-dbgsym_4.0-1-1_amd64.deb
 935fbf015ddd1b41f79fbf5ef8f7ec029a9ec9e96b81abcad70cddc1bcc7904e 37638 
libftp-dev_4.0-1-1_amd64.deb
 87b93f395ce8496f13157c7cd01b0fb5d77dfd919bd1e8404f9249ba7f92436c 20358 
libftp4-dbgsym_4.0-1-1_amd64.deb
 dd069797363164d36534dd1a0ea1733f2f83b8230ee70c74e1046bf9a9072b0e 20638 
libftp4_4.0-1-1_amd64.deb
Files:
 8586267a43d9d1b47b939fb0c0984010 1534 libs optional ftplib_4.0-1-1.dsc
 2bb35d21e1647c54032f63f59dfc24e7 66896 libs optional ftplib_4.0-1.orig.tar.gz
 b9fe55cbebff04df192d882500a8e10d 9412 libs optional 
ftplib_4.0-1-1.debian.tar.xz
 c2675dfabe3ae6b507a4f400e3b9fd00 10412 debug extra 
libftp-dev-dbgsym_4.0-1-1_amd64.deb
 b0e4834253804abae29b1bb739103418 37638 libdevel optional 
libftp-dev_4.0-1-1_amd64.deb
 c9ed0c2c6bf0d13ffc764ad6e81c9957 20358 debug extra 
libftp4-dbgsym_4.0-1-1_amd64.deb
 4a0b18d2f2bafe11cbeb47a98cfec066 20638 libs optional libftp4_4.0-1-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Comment: Signed by Raphael Hertzog

iQEcBAEBCgAGBQJXkLWNAAoJEAOIHavrwpq5tNAIAIxXxleIxldKvU4XwE7cEpnx
Exy/JVwgCsSbqqlh+gfBmcC/w0btGM5RVH3xsEPT5VuiAiYB4BK8xYPFlmsoqS0D
XIdXkiJ1eiYUvAo3eOZVjqafaRjCub0tXTWDTZDfu89qnOw7SEh3SeOU5DApmeL8
i1Fa7KnW4mMohlCSB3J7qqiDUz2OjbFPEFy2YxEQh9t+83j+ygKtjLrgQ+Wo1ORt
ipydUfYbQEEIX0xVxtl3ualn/sRylb1eqI+DYJImSeZ0RDOp94Ne5Y88Aweegme3
nT3fF+dxsh9PLujSVme9zQe95pNgfn49kGTHbfoS2cG/L3Wmuehg4PAN0JstyGs=
=RaXR
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to