summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/dpkgpm.cc
diff options
context:
space:
mode:
authorAdam Conrad <adconrad@0c3.net>2012-04-12 16:48:15 -0600
committerAdam Conrad <adconrad@0c3.net>2012-04-12 16:48:15 -0600
commit6ddc1adf2d91536570c0683ee322e4e4260268f3 (patch)
tree0b7700a64d8f5370584aec57a1ce90faca6fb8ab /apt-pkg/deb/dpkgpm.cc
parent925a7860ff339652e091da1927834490cc207f80 (diff)
Set FD_CLOEXEC on history.log's FD (Closes: #610069, LP: #636010)
Diffstat (limited to 'apt-pkg/deb/dpkgpm.cc')
-rw-r--r--apt-pkg/deb/dpkgpm.cc1
1 files changed, 1 insertions, 0 deletions
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;