summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2019-01-30 13:43:29 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2019-01-31 16:21:04 +0100
commit80282d1830fe31d87c1b67437f17df9a9001c633 (patch)
tree046943f777a02c28274a0e5fbcad22437b6bb7ee
parente3664a6178674a009b311cd5a88cc33599efa216 (diff)
downloadapt-80282d1830fe31d87c1b67437f17df9a9001c633.tar.gz
Disable deprecated methods (ftp, rsh, ssh) by default
These methods are not supposed to be used anymore, they are not actively maintained and may hence contain odd bugs. Fixes !49
-rw-r--r--apt-pkg/acquire-worker.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc
index c2bbf8bed..b36186121 100644
--- a/apt-pkg/acquire-worker.cc
+++ b/apt-pkg/acquire-worker.cc
@@ -98,6 +98,8 @@ bool pkgAcquire::Worker::Start()
std::string Method;
if (_config->Exists(confItem))
Method = _config->FindFile(confItem.c_str());
+ else if (Access == "ftp" || Access == "rsh" || Access == "ssh")
+ return _error->Error(_("The method '%s' is unsupported and disabled by default. Consider switching to http(s). Set Dir::Bin::Methods::%s to \"%s\" to enable it again."), Access.c_str(), Access.c_str(), Access.c_str());
else
Method = _config->FindDir(methodsDir) + Access;
if (FileExists(Method) == false)