From 36f1098aed548651a32a2c15cc9ad80c4330b4d9 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 12 Jan 2011 17:09:04 +0100 Subject: * apt-pkg/contrib/fileutl.cc: - add a RealFileExists method and check that your configuration files are real files to avoid endless loops if not (Closes: #604401) --- apt-pkg/sourcelist.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apt-pkg/sourcelist.cc') diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc index c3ec9865a..851eefdfe 100644 --- a/apt-pkg/sourcelist.cc +++ b/apt-pkg/sourcelist.cc @@ -197,7 +197,7 @@ bool pkgSourceList::ReadMainList() string Main = _config->FindFile("Dir::Etc::sourcelist"); string Parts = _config->FindDir("Dir::Etc::sourceparts"); - if (FileExists(Main) == true) + if (RealFileExists(Main) == true) Res &= ReadAppend(Main); else if (DirectoryExists(Parts) == false) // Only warn if there are no sources.list.d. @@ -205,9 +205,9 @@ bool pkgSourceList::ReadMainList() if (DirectoryExists(Parts) == true) Res &= ReadSourceDir(Parts); - else if (FileExists(Main) == false) + else if (RealFileExists(Main) == false) // Only warn if there is no sources.list file. - _error->WarningE("FileExists", _("Unable to read %s"), Main.c_str()); + _error->WarningE("RealFileExists", _("Unable to read %s"), Main.c_str()); return Res; } -- cgit v1.2.3