From: Michael Vogt Date: Thu, 28 Oct 2010 19:11:52 +0000 (+0200) Subject: * apt-pkg/deb/dpkgpm.cc: X-Git-Tag: 0.8.8~2 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/c1fa50e1502b2f3ab2ec44cad00c3af3f910615a?hp=95fe33dc131bee1a0917ba647e44855c10083ab5 * apt-pkg/deb/dpkgpm.cc: - ensure that history.log gets closed to avoid leaking a FD (closes: #601649) --- diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 395c3fb1a..9f0da3be6 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -660,6 +660,7 @@ bool pkgDPkgPM::OpenLog() if (term_out == NULL) return _error->WarningE("OpenLog", _("Could not open file '%s'"), logfile_name.c_str()); setvbuf(term_out, NULL, _IONBF, 0); + SetCloseExec(fileno(term_out), true); chmod(logfile_name.c_str(), 0600); fprintf(term_out, "\nLog started: %s\n", timestr); } diff --git a/debian/changelog b/debian/changelog index 5ff165cfe..9a3962ba4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,9 @@ apt (0.8.7) unstable; urgency=low * apt-pkg/deb/debsystem.cc: - fix issues with dir::state::status and dir::state::extended_states when alternative rootdirs are used + * apt-pkg/deb/dpkgpm.cc: + - ensure that history.log gets closed to avoid leaking a FD + (closes: #601649) [ Martin Pitt ] * apt-pkg/deb/debindexfile.cc: