summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-04-20 09:12:56 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-04-20 09:12:56 +0200
commitd4621f8277a76f3e5c87b06f7abd93df04446efc (patch)
treeaa80d597847a18328bfc58dd38ff26ef237a82cc /apt-pkg
parent2448a064f33c66d4f698375d30b87201a5a3b103 (diff)
cherry pick r1975 from lp:~ubuntu-core-dev/apt/ubuntu
Diffstat (limited to 'apt-pkg')
-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 be11870fd..14376f649 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -738,6 +738,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;