// constructor of pkgAcqMetaClearSig moved it out of the way,
// now move it back in on IMS hit for the 'old' file
string const OldClearSig = DestFile + ".reverify";
if (RealFileExists(OldClearSig) == true)
Rename(OldClearSig, FinalFile);
// constructor of pkgAcqMetaClearSig moved it out of the way,
// now move it back in on IMS hit for the 'old' file
string const OldClearSig = DestFile + ".reverify";
if (RealFileExists(OldClearSig) == true)
Rename(OldClearSig, FinalFile);
// index targets + (worst case:) Release/Release.gpg
ExpectedAdditionalItems = IndexTargets->size() + 2;
// index targets + (worst case:) Release/Release.gpg
ExpectedAdditionalItems = IndexTargets->size() + 2;
// keep the old InRelease around in case of transistent network errors
string const Final = _config->FindDir("Dir::State::lists") + URItoFileName(RealURI);
if (RealFileExists(Final) == true)
// keep the old InRelease around in case of transistent network errors
string const Final = _config->FindDir("Dir::State::lists") + URItoFileName(RealURI);
if (RealFileExists(Final) == true)
string const LastGoodSig = DestFile + ".reverify";
Rename(Final,LastGoodSig);
}
string const LastGoodSig = DestFile + ".reverify";
Rename(Final,LastGoodSig);
}
// if the file was never queued undo file-changes done in the constructor
if (QueueCounter == 1 && Status == StatIdle && FileSize == 0 && Complete == false)
{
// if the file was never queued undo file-changes done in the constructor
if (QueueCounter == 1 && Status == StatIdle && FileSize == 0 && Complete == false)
{
if (RealFileExists(Final) == false && RealFileExists(LastGoodSig) == true)
Rename(LastGoodSig, Final);
}
if (RealFileExists(Final) == false && RealFileExists(LastGoodSig) == true)
Rename(LastGoodSig, Final);
}
if (stat(Final.c_str(),&Buf) != 0)
return "\nIndex-File: true\nFail-Ignore: true\n";
}
if (stat(Final.c_str(),&Buf) != 0)
return "\nIndex-File: true\nFail-Ignore: true\n";
}
- // Remove the 'old' InRelease file if we try Release.gpg now as otherwise
- // the file will stay around and gives a false-auth impression (CVE-2012-0214)
+ // Queue the 'old' InRelease file for removal if we try Release.gpg
+ // as otherwise the file will stay around and gives a false-auth
+ // impression (CVE-2012-0214)
new pkgAcqMetaIndex(Owner, TransactionID,
MetaIndexURI, MetaIndexURIDesc, MetaIndexShortDesc,
new pkgAcqMetaIndex(Owner, TransactionID,
MetaIndexURI, MetaIndexURIDesc, MetaIndexShortDesc,