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/init.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apt-pkg/init.cc') diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index f0bad78df..734f5b2c4 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -94,10 +94,10 @@ bool pkgInitConfig(Configuration &Cnf) const char *Cfg = getenv("APT_CONFIG"); if (Cfg != 0) { - if (FileExists(Cfg) == true) + if (RealFileExists(Cfg) == true) Res &= ReadConfigFile(Cnf,Cfg); else - _error->WarningE("FileExists",_("Unable to read %s"),Cfg); + _error->WarningE("RealFileExists",_("Unable to read %s"),Cfg); } // Read the configuration parts dir @@ -109,7 +109,7 @@ bool pkgInitConfig(Configuration &Cnf) // Read the main config file string FName = Cnf.FindFile("Dir::Etc::main"); - if (FileExists(FName) == true) + if (RealFileExists(FName) == true) Res &= ReadConfigFile(Cnf,FName); if (Res == false) -- cgit v1.2.3