From 6ddc1adf2d91536570c0683ee322e4e4260268f3 Mon Sep 17 00:00:00 2001 From: Adam Conrad Date: Thu, 12 Apr 2012 16:48:15 -0600 Subject: Set FD_CLOEXEC on history.log's FD (Closes: #610069, LP: #636010) --- apt-pkg/deb/dpkgpm.cc | 1 + debian/changelog | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index eb43cbfb8..653e14190 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -737,6 +737,7 @@ bool pkgDPkgPM::OpenLog() d->history_out = fopen(history_name.c_str(),"a"); if (d->history_out == NULL) return _error->WarningE("OpenLog", _("Could not open file '%s'"), history_name.c_str()); + SetCloseExec(fileno(d->history_out), true); chmod(history_name.c_str(), 0644); fprintf(d->history_out, "\nStart-Date: %s\n", timestr); string remove, purge, install, reinstall, upgrade, downgrade; diff --git a/debian/changelog b/debian/changelog index e24e8338f..2b486330a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +apt (0.8.16~exp12ubuntu8) precise; urgency=low + + * Set FD_CLOEXEC on history.log's FD (Closes: #610069, LP: #636010) + + -- Adam Conrad Thu, 12 Apr 2012 16:26:20 -0600 + apt (0.8.16~exp12ubuntu7) precise; urgency=low * clean up obsolete conffile /etc/apt/apt.conf.d/01ubuntu, which was -- cgit v1.2.3