From 1e33fb4ac68db5c2630de72d222d9dc10eb93272 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Fri, 23 Dec 2016 01:29:49 -0800 Subject: Only check for valid Date if checking Valid-Until. --- apt-pkg/deb/debmetaindex.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apt-pkg/deb/debmetaindex.cc') diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index 8d84409a1..d5afab777 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -448,10 +448,7 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro std::string const StrDate = Section.FindS("Date"); if (RFC1123StrToTime(StrDate.c_str(), Date) == false) - { - _error->Warning( _("Invalid '%s' entry in Release file %s"), "Date", Filename.c_str()); Date = 0; - } bool CheckValidUntil = _config->FindB("Acquire::Check-Valid-Until", true); if (d->CheckValidUntil == metaIndex::TRI_NO) @@ -461,6 +458,9 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro if (CheckValidUntil == true) { + if (Date == 0) + _error->Warning( _("Invalid '%s' entry in Release file %s"), "Date", Filename.c_str()); + std::string const Label = Section.FindS("Label"); std::string const StrValidUntil = Section.FindS("Valid-Until"); -- cgit v1.2.3 From 3650e87b0cee98547024c2cb613c95f5e736971d Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 25 Dec 2016 22:03:03 -0800 Subject: This is 2016 and APT already requires use of mmap. --- apt-pkg/deb/debmetaindex.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg/deb/debmetaindex.cc') diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index d5afab777..dbe90e388 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -373,7 +373,7 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro if (OpenMaybeClearSignedFile(Filename, Fd) == false) return false; - pkgTagFile TagFile(&Fd, Fd.Size()); + pkgTagFile TagFile(&Fd); if (Fd.IsOpen() == false || Fd.Failed()) { if (ErrorText != NULL) @@ -801,7 +801,7 @@ bool debReleaseIndex::Merge(pkgCacheGenerator &Gen,OpProgress * /*Prog*/) const/ File->Size = Buf.st_size; File->mtime = Buf.st_mtime; - pkgTagFile TagFile(&Rel, Rel.Size()); + pkgTagFile TagFile(&Rel); pkgTagSection Section; if (Rel.IsOpen() == false || Rel.Failed() || TagFile.Step(Section) == false) return false; -- cgit v1.2.3 From 1242b3bdaf3d3682a945f10f0e537bdb3b0599d5 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 26 Dec 2016 03:36:30 -0800 Subject: Wreck validation until we can assess ecosystem :/. --- apt-pkg/deb/debmetaindex.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg/deb/debmetaindex.cc') diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index dbe90e388..091b187a2 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -440,9 +440,9 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro bool AuthPossible = false; if(FoundHashSum == false) - _error->Warning(_("No Hash entry in Release file %s"), Filename.c_str()); + /*_error->Warning(_("No Hash entry in Release file %s"), Filename.c_str())*/; else if(FoundStrongHashSum == false) - _error->Warning(_("No Hash entry in Release file %s which is considered strong enough for security purposes"), Filename.c_str()); + /*_error->Warning(_("No Hash entry in Release file %s which is considered strong enough for security purposes"), Filename.c_str())*/; else AuthPossible = true; -- cgit v1.2.3