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

Bug#420940: marked as done (apt-get can't enter passive mode)



Your message dated Thu, 07 Jul 2016 18:52:38 +0000
with message-id <E1bLEPe-0006mg-PG@franck.debian.org>
and subject line Bug#420940: fixed in apt 1.3~pre1
has caused the Debian Bug report #420940,
regarding apt-get can't enter passive mode
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 owner@bugs.debian.org
immediately.)


-- 
420940: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=420940
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: apt
Version: 0.6.46.4-0.1

I have found apt-get can't enter passive mode when talking to some ftp
servers. The one that caused me trouble is ftp.icm.edu.pl which runs
wu-ftpd 2.6.2(1). The ftp method is prepared to parse a response to
PASV command where the numbers are enclosed in parentheses while
wu-ftpd sends the numbers without them.

I attach a patch which makes apt to cope with such a situation
gracefully. 

-- 
Miłego dnia,
Łukasz Stelmach
--- apt-0.6.46.4.1/methods/ftp.cc	2006-12-04 15:37:36.000000000 +0100
+++ apt-0.6.46.4.1-new/methods/ftp.cc	2007-04-25 14:12:44.000000000 +0200
@@ -480,12 +480,21 @@ bool FTPConn::GoPasv()
    
    // Unsupported function
    string::size_type Pos = Msg.find('(');
-   if (Tag >= 400 || Pos == string::npos)
+   if (Tag >= 400)
       return true;
+ 
+   //wu-2.6.2(1) ftp server, returns
+   //227 Entering Passive Mode 193,219,28,140,150,111
+   //without parentheses, let's try to cope with it.
+   //wget(1) and ftp(1) can.
+   if (Pos == string::npos)
+      Pos = Msg.rfind(' ');
+   else
+      ++Pos;
 
    // Scan it
    unsigned a0,a1,a2,a3,p0,p1;
-   if (sscanf(Msg.c_str() + Pos,"(%u,%u,%u,%u,%u,%u)",&a0,&a1,&a2,&a3,&p0,&p1) != 6)
+   if (sscanf(Msg.c_str() + Pos,"%u,%u,%u,%u,%u,%u",&a0,&a1,&a2,&a3,&p0,&p1) != 6)
       return true;
    
    /* Some evil servers return 0 to mean their addr. We can actually speak

--- End Message ---
--- Begin Message ---
Source: apt
Source-Version: 1.3~pre1

We believe that the bug you reported is fixed in the latest version of
apt, 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 420940@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Julian Andres Klode <jak@debian.org> (supplier of updated apt 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 ftpmaster@ftp-master.debian.org)


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

Format: 1.8
Date: Thu, 07 Jul 2016 20:25:18 +0200
Source: apt
Binary: apt libapt-pkg5.0 libapt-inst2.0 apt-doc libapt-pkg-dev libapt-pkg-doc apt-utils apt-transport-https
Architecture: source
Version: 1.3~pre1
Distribution: unstable
Urgency: medium
Maintainer: APT Development Team <deity@lists.debian.org>
Changed-By: Julian Andres Klode <jak@debian.org>
Description:
 apt        - commandline package manager
 apt-doc    - documentation for APT
 apt-transport-https - https download transport for APT
 apt-utils  - package management related utility programs
 libapt-inst2.0 - deb package format runtime library
 libapt-pkg-dev - development files for APT's libapt-pkg and libapt-inst
 libapt-pkg-doc - documentation for APT development
 libapt-pkg5.0 - package management runtime library
Closes: 420940 825216 827930 828011 828812 828908 829232 829651
Changes:
 apt (1.3~pre1) unstable; urgency=medium
 .
   Upload to unstable from the pub because Niels wanted it
 .
   [ David Kalnischkies ]
   * show right binary name in simulation notice (Closes: 825216)
   * imbue datetime parsing with C.UTF-8 locale (Closes: 828011)
   * imbue .diff/Index parsing with C.UTF-8 as well
   * close server if parsing of header field failed
   * add myself to Uploaders
   * eipp: implement version 0.1 of the protocol
   * eipp: provide the internal planer as an external one
   * eipp: make no difference between remove & purge
   * eipp: properly handle arch-specific provides
   * eipp: implement Immediate-Configuration flag
   * eipp: add Allow-Temporary-Remove-of-Essentials
   * eipp: rename stanza 'Install' to 'Unpack'
   * eipp: enable xz-compressed scenario logging
   * if conf unset, don't read / as conf/pref/sources dir
   * don't do atomic overrides with failed files (Closes: 828908)
   * if reading of autobit state failed, let write fail
   * write auto-bits before calling dpkg & again after if needed
   * protect only the latest same-source providers from autoremove
   * reinstalling local deb file is no downgrade
   * do not treat same-version local debs as downgrade
   * alias apt-key list to finger (Closes: 829232)
   * warn if apt-key is used in scripts/its output parsed
   * deprecate 'apt-key update' and no-op it in Debian
   * use +0000 instead of UTC by default as timezone in output
   * avoid 416 response teardown binding to null pointer
   * report write errors in EDSP/EIPP properly back to caller
   * EIPP/EDSP log can't be written is a warning, not an error
   * don't change owner/perms/times through file:// symlinks
   * report all instead of first error up the acquire chain
   * keep trying with next if connection to a SRV host failed
 .
   [ Zhou Mo ]
   * zh_CN.po: update simplified chinese translation
 .
   [ Julian Andres Klode ]
   * methods/ftp: Cope with weird PASV responses.
     Thanks to Lukasz Stelmach for the initial patch (Closes: #420940)
   * Fix buffer overflow in debListParser::VersionHash() (Closes: #828812)
   * cache: Bump minor version to 6
   * indextargets: Check that cache could be built before using it
     (Closes: #829651)
 .
   [ Nicolas Le Cam ]
   * Use the ConditionACPower feature of systemd in the apt-daily service
     (Closes: #827930)
   * Add a apt suggests powermgmt-base
Checksums-Sha1:
 9439b5c447bd2ea5ebeb5aafe4421e62dbd5befc 2394 apt_1.3~pre1.dsc
 2c9c63296cbf8ffdd0755016470c86a1cb222c37 2080144 apt_1.3~pre1.tar.xz
Checksums-Sha256:
 f6629af660c31ddf05f2f2381c8e095697ef7775d7b41c2b98483bc010acf7f4 2394 apt_1.3~pre1.dsc
 2ca1e437984be6d08e9b94b2ebd6d82c6da23fd95fa5fef35edfff2e5caa8a28 2080144 apt_1.3~pre1.tar.xz
Files:
 765b3f139ee37f9e32c5d4ccc2f10bb5 2394 admin important apt_1.3~pre1.dsc
 54025ff12b3457ebf391cbbf9559d36f 2080144 admin important apt_1.3~pre1.tar.xz

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJXfqHmAAoJENc8OeVlgLOG/8YP/2ej0Ga9T2G95h6l17gjpm4Y
Xxeo7zZWcrjlAV+IptDwdZGh2OH2gY3qf+vVXaK0ZhR0ZpiLWZXS9lEvOIjzpyFD
GAAAjQnTGlkSHo8XroimEfVb9r8vh6j2RsT3OKN0HsKSXp/B+CFXKIz656OKYbAT
s7FteDfpe4hxeFk8tHFfHleCaOTXTy2KhvQ0i3PPMJi/lA+BuVwCm5V9olP7gGQL
GJw+QGQsD00kDHPiWWtLG0x+d0NWOoByfa0Eg32sOl0/VF22PlDl4QVU7unu3sLw
aGLQa3rbKShqVtAnztSJjgVzhPmUFyd3/7Na2pa7XBv66dc7WIl85a6+EUXUBOjU
mOFbFEEJrK4ecGVZsZ/l3uc4s/NqT1C1Tjxd40oAZAl3VY1VrTvXKifMGSsNuG7g
cSHTR9KzfcmZFQ7XvOZPYJ2yzLiGYL6OjWWgimzmiZftVM0ZjoLiZkoz+SxbMVTM
3901ehX3Vws9fNbMZRg9F2zrzzGcRpoSGtnTpgQcmuQlLhWPi4CKqnitRsgPmMVh
2dJIyxQ94uhVmGp2gtyaBAsS7iXRuWF1Cf/H/ovA9iRs0Rm+m+Utrq0syti50D1M
bIToqcHwU8MH9x5AWUWa/mk2Q1n9e+ZCi73u1J1S3cU84VIbOcXuq0B2+zflqRjY
RjX8pFX8vCGyIxWjTO1u
=UcRb
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: