diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2009-12-10 16:07:43 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2009-12-10 16:07:43 +0100 |
commit | 9307ef07498d37c0b5e05b036195abaf7ad0105c (patch) | |
tree | cf85e1f46b31161dc4c601fa79fc76a85154d696 /methods/ftp.cc | |
parent | 1eb5622017241e874016b759625b2b706ed9a74c (diff) | |
parent | e4b16ac68196eab5e58abf715459fe70c199cff3 (diff) |
* merge lp:~mvo/apt/netrc branch, this adds support for a
/etc/apt/auth.conf that can be used to store username/passwords
in a "netrc" style file (with the extension that it supports "/"
in a machine definition). Based on the maemo git branch.
* apt-pkg/deb/dpkgpm.cc:
- add "purge" to list of known actions
Diffstat (limited to 'methods/ftp.cc')
-rw-r--r-- | methods/ftp.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/methods/ftp.cc b/methods/ftp.cc index c91600ad5..3e1725823 100644 --- a/methods/ftp.cc +++ b/methods/ftp.cc @@ -19,6 +19,7 @@ #include <apt-pkg/acquire-method.h> #include <apt-pkg/error.h> #include <apt-pkg/hashes.h> +#include <apt-pkg/netrc.h> #include <sys/stat.h> #include <sys/time.h> @@ -982,7 +983,9 @@ bool FtpMethod::Fetch(FetchItem *Itm) FetchResult Res; Res.Filename = Itm->DestFile; Res.IMSHit = false; - + + maybe_add_auth (Get, _config->FindFile("Dir::Etc::netrc")); + // Connect to the server if (Server == 0 || Server->Comp(Get) == false) { |