diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-10-28 14:56:32 -0400 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-10-28 14:56:32 -0400 |
commit | fd8bb61d2945d2e2f19f0e0a753129235717a9f3 (patch) | |
tree | 71c56afe89023af98dc14656d83fda117a651bcc | |
parent | 44dc669e08353716da835608ea54563b4c8c32bb (diff) |
* apt-pkg/deb/dpkgpm.cc:
- ensure that history.log gets closed to avoid leaking a FD
(closes: #601649)
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 1 | ||||
-rw-r--r-- | debian/changelog | 3 |
2 files changed, 4 insertions, 0 deletions
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 739f1b425..06065348e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,9 @@ apt (0.8.7) UNRELEASED; 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: |