summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-06-09 12:04:54 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-06-09 12:04:54 +0200
commit617244130193ecf6fb9a1c31a679449a98b40816 (patch)
treecadee8cbfa9746b1d2ff372b98ee3b9b2f95522e
parent24e9fedacb134c2dae5edcd0fa559b38f12f5dbc (diff)
parenta7a2824bad5fd9c868f4774771ec9fb2f1895285 (diff)
* apt-pkg/deb/dpkgpm.cc:
- Fix segmentation fault when /var/log/apt ist missing. LP: #535509
-rw-r--r--apt-pkg/deb/dpkgpm.cc5
-rw-r--r--debian/changelog5
2 files changed, 10 insertions, 0 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 18c731788..036f0e385 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -653,6 +653,11 @@ bool pkgDPkgPM::CloseLog()
}
term_out = NULL;
+ // check if the directory exists in which we want to write the file
+ string const logdir = _config->FindDir("Dir::Log");
+ if(not FileExists(logdir))
+ return _error->Error(_("Directory '%s' missing"), logdir.c_str());
+
string history_name = flCombine(_config->FindDir("Dir::Log"),
_config->Find("Dir::Log::History"));
if (!history_name.empty())
diff --git a/debian/changelog b/debian/changelog
index 9ed7c587b..f1e0a97ed 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,12 @@
apt (0.7.25.3ubuntu10) maverick; urgency=low
+ [ Michael Vogt ]
* debian/apt.conf.ubuntu:
- no longer install (empty) apt.conf.d/01ubuntu
+
+ [ Matthias G. ]
+ * apt-pkg/deb/dpkgpm.cc:
+ - Fix segmentation fault when /var/log/apt ist missing. LP: #535509
-- Michael Vogt <michael.vogt@ubuntu.com> Wed, 09 Jun 2010 10:48:16 +0200