From 2448a064f33c66d4f698375d30b87201a5a3b103 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 19 Apr 2012 10:54:44 +0200 Subject: [PATCH 1/1] * apt-inst/contrib/extracttar.cc: - ensure that in StartGzip the InFd is set to "AutoClose" to ensure that the pipe is closed when InFd is closed. This fixes a Fd leak (LP: #985452) --- apt-inst/contrib/extracttar.cc | 2 +- debian/changelog | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc index 12919a7cd..806ba796d 100644 --- a/apt-inst/contrib/extracttar.cc +++ b/apt-inst/contrib/extracttar.cc @@ -146,7 +146,7 @@ bool ExtractTar::StartGzip() } // Fix up our FDs - InFd.Fd(Pipes[0]); + InFd.OpenDescriptor(Pipes[0], FileFd::ReadOnly, FileFd::None, true); close(Pipes[1]); return true; } diff --git a/debian/changelog b/debian/changelog index 48b63784e..50d6ea3ce 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +apt (0.8.16~exp15) unstable; urgency=low + + * apt-inst/contrib/extracttar.cc: + - ensure that in StartGzip the InFd is set to "AutoClose" to ensure + that the pipe is closed when InFd is closed. This fixes a Fd leak + (LP: #985452) + + -- Michael Vogt Thu, 19 Apr 2012 10:53:30 +0200 + apt (0.8.16~exp14) UNRELEASED; urgency=low [ Michael Vogt ] -- 2.45.2