summaryrefslogtreecommitdiff
path: root/cmdline/apt-get.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-06-10 19:00:41 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-06-10 19:00:41 +0200
commitafaeea148553439684e6091f282bf5a4ee5c00d6 (patch)
tree9de4549d414a78bed64a2a20f7941695c7d6c4df /cmdline/apt-get.cc
parentb4278cc96fa0184b4f522e2bcfe82bd8eba93595 (diff)
parenteea0f3a6197dba565c5df349ed06c0a70b49b77f (diff)
Merge branch 'debian/sid' into ubuntu/master1.0.4ubuntu1
Conflicts: configure.ac debian/changelog
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r--cmdline/apt-get.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index a24a1b45a..05785ec54 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -756,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;
@@ -764,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-");
@@ -847,6 +851,10 @@ static bool DoSource(CommandLine &CmdL)
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();