]> git.saurik.com Git - apt.git/commitdiff
Set FD_CLOEXEC on history.log's FD (Closes: #610069, LP: #636010)
authorAdam Conrad <adconrad@0c3.net>
Thu, 12 Apr 2012 22:48:15 +0000 (16:48 -0600)
committerAdam Conrad <adconrad@0c3.net>
Thu, 12 Apr 2012 22:48:15 +0000 (16:48 -0600)
apt-pkg/deb/dpkgpm.cc
debian/changelog

index eb43cbfb82c29b7184b9ecff62ab2384cb9ff142..653e141906d325bd5687045be334340654f8dc07 100644 (file)
@@ -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());
       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;
       chmod(history_name.c_str(), 0644);
       fprintf(d->history_out, "\nStart-Date: %s\n", timestr);
       string remove, purge, install, reinstall, upgrade, downgrade;
index e24e8338f1d1d5c421ee0b729a348a45fc170b4d..2b486330aac3529a90ebfa3ba7200d6369717505 100644 (file)
@@ -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 <adconrad@ubuntu.com>  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
 apt (0.8.16~exp12ubuntu7) precise; urgency=low
 
   * clean up obsolete conffile /etc/apt/apt.conf.d/01ubuntu, which was