summaryrefslogtreecommitdiff
path: root/cmdline/apt-get.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-06-18 08:32:47 +0200
committerMichael Vogt <mvo@debian.org>2014-06-18 08:32:47 +0200
commitaa0bd601ea3db281187275bbbece760d85ff29d9 (patch)
treec84bebb3966255cdae36562024592c6b4eb6a2f2 /cmdline/apt-get.cc
parent80624be7c54aec6ed98ee254366155024fca1a71 (diff)
parent6074bc9ba4ecdd08674a828bdb46323b5d8bf957 (diff)
Merge branch 'debian/sid' into debian/experimental
Conflicts: debian/changelog
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r--cmdline/apt-get.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 1943a0fa7..bd866bc8c 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -76,6 +76,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/statfs.h>
#include <sys/statvfs.h>
@@ -755,6 +756,7 @@ static bool DoSource(CommandLine &CmdL)
// Load the requestd sources into the fetcher
unsigned J = 0;
+ std::string UntrustedList;
for (const char **I = CmdL.FileList + 1; *I != 0; I++, J++)
{
string Src;
@@ -763,6 +765,9 @@ static bool DoSource(CommandLine &CmdL)
if (Last == 0) {
return _error->Error(_("Unable to find a source package for %s"),Src.c_str());
}
+
+ if (Last->Index().IsTrusted() == false)
+ UntrustedList += Src + " ";
string srec = Last->AsStr();
string::size_type pos = srec.find("\nVcs-");
@@ -848,6 +853,10 @@ static bool DoSource(CommandLine &CmdL)
I->Hashes, I->Size, Last->Index().SourceInfo(*Last,*I), Src);
}
}
+
+ // check authentication status of the source as well
+ if (UntrustedList != "" && !AuthPrompt(UntrustedList, false))
+ return false;
// Display statistics
unsigned long long FetchBytes = Fetcher.FetchNeeded();