From 23e64f6d0facf9610c1042326ad9850e071e8349 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 4 Nov 2015 14:48:36 +0100 Subject: allow acquire method specific options via Binary scope Allows users who know what they are getting themselves into with this trick to e.g. disable privilege dropping for e.g. file:// until they can fix up the permissions on those repositories. It helps also the test framework and people with a similar setup (= me) to run in less modified environments. --- methods/ftp.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'methods/ftp.cc') diff --git a/methods/ftp.cc b/methods/ftp.cc index 360333107..a8bc95938 100644 --- a/methods/ftp.cc +++ b/methods/ftp.cc @@ -950,7 +950,7 @@ bool FTPConn::Get(const char *Path,FileFd &To,unsigned long long Resume, // FtpMethod::FtpMethod - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -FtpMethod::FtpMethod() : pkgAcqMethod("1.0",SendConfig) +FtpMethod::FtpMethod() : aptMethod("ftp","1.0",SendConfig) { signal(SIGTERM,SigTerm); signal(SIGINT,SigTerm); @@ -985,13 +985,10 @@ void FtpMethod::SigTerm(int) /* We stash the desired pipeline depth */ bool FtpMethod::Configuration(string Message) { - if (pkgAcqMethod::Configuration(Message) == false) + if (aptMethod::Configuration(Message) == false) return false; - - TimeOut = _config->FindI("Acquire::Ftp::Timeout",TimeOut); - // no more active ftp, sorry - DropPrivsOrDie(); + TimeOut = _config->FindI("Acquire::Ftp::Timeout",TimeOut); return true; } -- cgit v1.2.3