X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/385d9f2f23057bc5808b5e013e77ba16d1c94da4..27f38567fe327ecaf7fb361c3cca6ee29e6300c9:/apt-pkg/init.cc?ds=sidebyside diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index a41d604d3..fa679e6c6 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -76,6 +77,7 @@ bool pkgInitConfig(Configuration &Cnf) Cnf.CndSet("Dir::Log","var/log/apt"); Cnf.CndSet("Dir::Log::Terminal","term.log"); Cnf.CndSet("Dir::Log::History","history.log"); + Cnf.CndSet("Dir::Log::Planner","eipp.log.xz"); Cnf.Set("Dir::Ignore-Files-Silently::", "~$"); Cnf.Set("Dir::Ignore-Files-Silently::", "\\.disabled$"); @@ -86,10 +88,8 @@ bool pkgInitConfig(Configuration &Cnf) Cnf.Set("Dir::Ignore-Files-Silently::", "\\.distUpgrade$"); // Repository security - // FIXME: this is set to "true" for backward compatibility, once - // jessie is out we want to change this to "false" to - // improve security - Cnf.CndSet("Acquire::AllowInsecureRepositories", true); + Cnf.CndSet("Acquire::AllowInsecureRepositories", false); + Cnf.CndSet("Acquire::AllowWeakRepositories", false); Cnf.CndSet("Acquire::AllowDowngradeToInsecureRepositories", false); // Default cdrom mount point @@ -135,14 +135,14 @@ bool pkgInitConfig(Configuration &Cnf) } // Read the configuration parts dir - std::string Parts = Cnf.FindDir("Dir::Etc::parts"); + std::string const Parts = Cnf.FindDir("Dir::Etc::parts", "/dev/null"); if (DirectoryExists(Parts) == true) Res &= ReadConfigDir(Cnf,Parts); - else + else if (APT::String::Endswith(Parts, "/dev/null") == false) _error->WarningE("DirectoryExists",_("Unable to read %s"),Parts.c_str()); // Read the main config file - std::string FName = Cnf.FindFile("Dir::Etc::main"); + std::string const FName = Cnf.FindFile("Dir::Etc::main", "/dev/null"); if (RealFileExists(FName) == true) Res &= ReadConfigFile(Cnf,FName);