Bug#586904: apt-get update - sources.list one domain, two different credentials
On Mi, 2010-06-23 at 11:34 +0000, Tomasz Pajor wrote:
> Package: apt
> Version: 0.7.25.3
> Severity: grave
> Tags: squeeze experimental sid
>
>
> Hello,
>
> I have a problem with apt-get update, I added these lines to sources.list:
>
> deb ftp://user1:aiNai6qu@apt.domain.com/ repo1 testing
> deb ftp://user2:IeHai0Ai@apt.domain.com/ repo2 testing
>
> apt-get fetches the first one properly but for the second one,
> it does not login with the proper credentials, just assumes that
> it is already authorize and tries to fetch repo2 from the first location
> which won't happen obviously.
>
I committed the following fix. This will cause it to create a new
connection if the login differs.
The better alternative would be to reuse the connection and re-login if
the login differ, but it's also slightly more complicated and thus has a
higher chance to break something.
=== modified file 'methods/ftp.h'
--- methods/ftp.h 2004-09-20 16:57:09 +0000
+++ methods/ftp.h 2010-06-24 08:50:50 +0000
@@ -40,7 +40,7 @@ class FTPConn
public:
- bool Comp(URI Other) {return Other.Host == ServerName.Host && Other.Port == ServerName.Port;};
+ bool Comp(URI Other) {return Other.Host == ServerName.Host && Other.Port == ServerName.Port && Other.User == ServerName.User && Other.Password == ServerName.Password; };
// Raw connection IO
bool ReadResp(unsigned int &Ret,string &Text);
--
Julian Andres Klode - Debian Developer, Ubuntu Member
See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.
Reply to: