]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/deb/dpkgpm.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Thu, 28 Oct 2010 18:56:32 +0000 (14:56 -0400)
committerMichael Vogt <michael.vogt@ubuntu.com>
Thu, 28 Oct 2010 18:56:32 +0000 (14:56 -0400)
  - ensure that history.log gets closed to avoid leaking a FD
    (closes: #601649)

apt-pkg/deb/dpkgpm.cc
debian/changelog

index 395c3fb1aed6da42338b556fa99688a31ef645bc..9f0da3be61a3c695b0242244cfb65326a638981e 100644 (file)
@@ -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);
    }
index 739f1b425634764f6efaa153e77771ac4e532585..06065348e199b87fa7122aaa6f9ed5efa8bf59f6 100644 (file)
@@ -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: