From ea92d0369e9848714f13a808c0bc8f2e5a53969a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 28 Sep 2005 08:11:11 +0000 Subject: * leak fix for debian #250583 --- apt-pkg/contrib/mmap.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc index bc22fba67..e395e6cc7 100644 --- a/apt-pkg/contrib/mmap.cc +++ b/apt-pkg/contrib/mmap.cc @@ -155,9 +155,9 @@ DynamicMMap::DynamicMMap(FileFd &F,unsigned long Flags,unsigned long WorkSpace) unsigned long EndOfFile = Fd->Size(); if (EndOfFile > WorkSpace) WorkSpace = EndOfFile; - else + else if(WorkSpace > 0) { - Fd->Seek(WorkSpace); + Fd->Seek(WorkSpace - 1); char C = 0; Fd->Write(&C,sizeof(C)); } -- cgit v1.2.3-70-g09d2 From e8cdc56aaf6a12223fb9868784c18c8c0ada6315 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 19 Oct 2005 08:11:04 +0000 Subject: * added APT::Authentication::Trust-CDROM option Patches applied: * michael.vogt@ubuntu.com--2005/apt--trust-cdrom--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-79 * michael.vogt@ubuntu.com--2005/apt--trust-cdrom--0--patch-1 * implemented "TrustCDROM" mode * michael.vogt@ubuntu.com--2005/apt--trust-cdrom--0--patch-2 * added APT::Authentication::TrustCDROM to the configure-index --- apt-pkg/deb/debmetaindex.cc | 4 ++++ debian/changelog | 4 +++- doc/examples/configure-index | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index 526c8c0b2..ed5cb80d1 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -165,6 +165,10 @@ bool debReleaseIndex::IsTrusted() const string VerifiedSigFile = _config->FindDir("Dir::State::lists") + URItoFileName(MetaIndexURI("Release")) + ".gpg"; + if(_config->FindB("APT::Authentication::Trust-CDROM", false)) + if(URI.substr(0,strlen("cdrom:")) == "cdrom:") + return true; + if (FileExists(VerifiedSigFile)) return true; return false; diff --git a/debian/changelog b/debian/changelog index 06bf36e0d..78a7f890a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,7 +16,9 @@ apt (0.6.41.1) unstable; urgency=low (closes: #316318, #327456) * fix leak in the mmap code, thanks to Daniel Burrows for the patch (closes: #250583) - * support for apt-get source -t (and honor pining) + * support for apt-get source -t (and honor pining) (closes: #152129) + * added "APT::Authentication::Trust-CDROM" option to make the life + for the installer people easier (closes: #334656) -- diff --git a/doc/examples/configure-index b/doc/examples/configure-index index dee0c06ff..5ab84fe05 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -72,6 +72,11 @@ APT NoAct "false"; }; + Authentication + { + Trust-CDROM "false"; // consider the CDROM always trusted + }; + GPGV { TrustedKeyring "/etc/apt/trusted.gpg"; -- cgit v1.2.3-70-g09d2 From ed478d8cabf4abd695f2cacc50442e8c0e3ac770 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 19 Oct 2005 10:30:32 +0000 Subject: * sparc64 alignment fix --- apt-pkg/contrib/md5.h | 2 +- debian/changelog | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/contrib/md5.h b/apt-pkg/contrib/md5.h index 9e20f7cef..9447e9956 100644 --- a/apt-pkg/contrib/md5.h +++ b/apt-pkg/contrib/md5.h @@ -58,7 +58,7 @@ class MD5SumValue class MD5Summation { - unsigned char Buf[4*4]; + uint32_t Buf[4]; unsigned char Bytes[2*4]; unsigned char In[16*4]; bool Done; diff --git a/debian/changelog b/debian/changelog index f237e5d69..078d2c8b2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,8 +21,11 @@ apt (0.6.41.1) unstable; urgency=low for the installer people easier (closes: #334656) * fix crash in apt-ftparchive (thanks to Bastian Blank for the patch) (closes: #334671) + * apt-pkg/contrib/md5.cc: + - fix a alignment problem on sparc64 that gives random bus errors + (thanks to Fabbione for providing a test-case) - -- + -- apt (0.6.41) unstable; urgency=low -- cgit v1.2.3-70-g09d2