From 284c8bbc764fed53bd0f9bc6a42a7521a0c617ce Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 1 Apr 2005 22:59:56 +0000 Subject: * changelog updated --- apt-pkg/acquire-item.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 714edd8d8..b2f896627 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -340,6 +340,12 @@ pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire *Owner, // File was already in place. It needs to be re-verified // because Release might have changed, so Move it into partial Rename(Final,DestFile); + // unlink the file and do not try to use I-M-S and Last-Modified + // if the users proxy is broken + if(_config->FindB("Acquire::BrokenProxy", false) == true) { + std::cerr << "forcing re-get of the signature file as requested" << std::endl; + unlink(DestFile.c_str()); + } } QueueURI(Desc); -- cgit v1.2.3 From 279048500953d786320065d0140b74a08d3a6368 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 6 Apr 2005 11:47:32 +0000 Subject: * honor "Acquire::gpgv::Options" in apt-cdrom too --- apt-pkg/indexcopy.cc | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index 4b6ac5ce0..77426386d 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -593,17 +593,41 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector &SigList, // verify the gpg signature of "Release" // gpg --verify "*I+Release.gpg", "*I+Release" + const char *Args[400]; + unsigned int i = 0; + string gpgvpath = _config->Find("Dir::Bin::gpg", "/usr/bin/gpgv"); string pubringpath = _config->Find("Apt::GPGV::TrustedKeyring", "/etc/apt/trusted.gpg"); + Args[i++] = gpgvpath.c_str(); + Args[i++] = "--keyring"; + Args[i++] = pubringpath.c_str(); + Configuration::Item const *Opts; + Opts = _config->Tree("Acquire::gpgv::Options"); + if (Opts != 0) + { + Opts = Opts->Child; + for (; Opts != 0; Opts = Opts->Next) + { + if (Opts->Value.empty() == true) + continue; + Args[i++] = Opts->Value.c_str(); + if(i >= 390) { + _error->Error("Argument list from Acquire::gpgv::Options too long. Exiting."); + return false; + } + } + } + Args[i++] = string(*I+"Release.gpg").c_str(); + Args[i++] = string(*I+"Release").c_str(); + Args[i++] = NULL; + pid_t pid = ExecFork(); if(pid < 0) { _error->Error("Fork failed"); return false; } if(pid == 0) { - execlp(gpgvpath.c_str(), gpgvpath.c_str(), "--keyring", - pubringpath.c_str(), string(*I+"Release.gpg").c_str(), - string(*I+"Release").c_str(), NULL); + execvp(gpgvpath.c_str(), (char**)Args); } if(!ExecWait(pid, "gpgv")) { _error->Warning("Signature verification failed for: %s", -- cgit v1.2.3 From 6ead9d25018d517cd6cfe27399b7fd7e33c1ef19 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sun, 6 Apr 2003 16:04:51 +0000 Subject: * corrected a incorrect use of string().c_str() (thanks to mdz!) --- apt-pkg/indexcopy.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index 77426386d..1f65062f7 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -598,6 +598,9 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector &SigList, string gpgvpath = _config->Find("Dir::Bin::gpg", "/usr/bin/gpgv"); string pubringpath = _config->Find("Apt::GPGV::TrustedKeyring", "/etc/apt/trusted.gpg"); + string releasegpg = *I+"Release.gpg"; + string release = *I+"Release"; + Args[i++] = gpgvpath.c_str(); Args[i++] = "--keyring"; Args[i++] = pubringpath.c_str(); @@ -617,8 +620,9 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector &SigList, } } } - Args[i++] = string(*I+"Release.gpg").c_str(); - Args[i++] = string(*I+"Release").c_str(); + + Args[i++] = releasegpg.c_str(); + Args[i++] = release.c_str(); Args[i++] = NULL; pid_t pid = ExecFork(); -- cgit v1.2.3