diff options
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r-- | apt-pkg/acquire-item.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 83c793093..037dfe656 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -25,6 +25,7 @@ #include <apt-pkg/hashes.h> #include <apt-pkg/indexfile.h> #include <apt-pkg/metaindex.h> +#include <apt-pkg/netrc.h> #include <apt-pkg/pkgcache.h> #include <apt-pkg/pkgrecords.h> #include <apt-pkg/sourcelist.h> @@ -3382,6 +3383,7 @@ pkgAcqArchive::pkgAcqArchive(pkgAcquire *const Owner, pkgSourceList *const Sourc StoreFilename.clear(); std::set<string> targetComponents, targetCodenames, targetSuites; + std::vector<std::unique_ptr<FileFd>> authconfs; for (auto Vf = Version.FileList(); Vf.end() == false; ++Vf) { auto const PkgF = Vf.File(); @@ -3389,6 +3391,8 @@ pkgAcqArchive::pkgAcqArchive(pkgAcquire *const Owner, pkgSourceList *const Sourc continue; if (PkgF.Flagged(pkgCache::Flag::NotSource)) continue; + if (PkgF.Flagged(pkgCache::Flag::PackagesRequireAuthorization) && !IsAuthorized(PkgF, authconfs)) + continue; pkgIndexFile *Index; if (Sources->FindIndex(PkgF, Index) == false) continue; |