From 67073e88fc4654be702fe3b176e94b86a484a858 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 14 Jan 2005 10:27:14 +0000 Subject: * commented the ftp no_proxy unseting in methods/ftp.cc --- methods/ftp.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'methods') diff --git a/methods/ftp.cc b/methods/ftp.cc index 00d3476c8..c115e165d 100644 --- a/methods/ftp.cc +++ b/methods/ftp.cc @@ -1098,8 +1098,10 @@ int main(int argc,const char *argv[]) char S[300]; snprintf(S,sizeof(S),"http_proxy=%s",getenv("ftp_proxy")); putenv(S); - //mvo: why should we unset no_proxy here? - //putenv("no_proxy="); + // mvo: because we switch from ftp to http we have to unset + // "no_proxy". otherwise the http method would try to + // get a ftp url using http (see #283718) + putenv("no_proxy="); // Run the http method string Path = flNotFile(argv[0]) + "http"; -- cgit v1.2.3 From ad6a45d86c537a08dfe3b165043f981530d32f94 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 8 Feb 2005 16:56:22 +0000 Subject: * added support for "Acquire::gpgv::options" in methods/gpgv.cc --- methods/gpgv.cc | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) (limited to 'methods') diff --git a/methods/gpgv.cc b/methods/gpgv.cc index b34ea8d85..79705fe5e 100644 --- a/methods/gpgv.cc +++ b/methods/gpgv.cc @@ -68,11 +68,42 @@ const char *GPGVMethod::VerifyGetSigners(const char *file, const char *outfile, } else if (pid == 0) { + const char *Args[400]; + unsigned int i = 0; + + Args[i++] = gpgvpath.c_str(); + Args[i++] = "--status-fd"; + Args[i++] = "3"; + 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 >= 395) { + std::cerr << "E: Argument list from Acquire::gpgv::Options too long. Exiting." << std::endl; + exit(111); + } + } + } + Args[i++] = file; + Args[i++] = outfile; + Args[i++] = NULL; + if (_config->FindB("Debug::Acquire::gpgv", false)) { - std::cerr << "Preparing to exec: " << gpgvpath - << " --status-fd 3 --keyring " << pubringpath - << " " << file << " " << outfile << std::endl; + std::cerr << "Preparing to exec: " << gpgvpath; + int j; + for(j=0;Args[j] != NULL; j++) + std::cerr << Args[j] << " "; + std::cerr << std::endl; } int nullfd = open("/dev/null", O_RDONLY); close(fd[0]); @@ -85,8 +116,7 @@ const char *GPGVMethod::VerifyGetSigners(const char *file, const char *outfile, putenv("LANG="); putenv("LC_ALL="); putenv("LC_MESSAGES="); - execlp(gpgvpath.c_str(), gpgvpath.c_str(), "--status-fd", "3", "--keyring", - pubringpath.c_str(), file, outfile, NULL); + execvp(gpgvpath.c_str(), (char **)Args); exit(111); } -- cgit v1.2.3 From ec048f63365407f01766ef218165280cee805f1a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 8 Feb 2005 16:59:19 +0000 Subject: * slightly cosmetic change in methods/gpgv.cc --- methods/gpgv.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'methods') diff --git a/methods/gpgv.cc b/methods/gpgv.cc index 79705fe5e..f7d16ef01 100644 --- a/methods/gpgv.cc +++ b/methods/gpgv.cc @@ -100,8 +100,7 @@ const char *GPGVMethod::VerifyGetSigners(const char *file, const char *outfile, if (_config->FindB("Debug::Acquire::gpgv", false)) { std::cerr << "Preparing to exec: " << gpgvpath; - int j; - for(j=0;Args[j] != NULL; j++) + for(unsigned int j=0;Args[j] != NULL; j++) std::cerr << Args[j] << " "; std::cerr << std::endl; } -- cgit v1.2.3