summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 035834a)
raw | patch | inline | side by side (parent: 035834a)
author | Sebastian Harl <sh@teamix.net> | |
Sat, 24 Nov 2012 14:31:57 +0000 (15:31 +0100) | ||
committer | Sebastian Harl <sh@teamix.net> | |
Sat, 24 Nov 2012 14:31:57 +0000 (15:31 +0100) |
Some versions of glob() return nothing in this case, resulting in PHP syntax
errors and a crash of PNP4Nagios.
Thanks to Christoph Anton Mitterer for reporting this and pointing out a fix!
Closes: #683138
errors and a crash of PNP4Nagios.
Thanks to Christoph Anton Mitterer for reporting this and pointing out a fix!
Closes: #683138
debian/changelog | patch | blob | history | |
debian/patches/adjust-template-path | patch | blob | history |
diff --git a/debian/changelog b/debian/changelog
index 74f5f1c703f6e609fd31e17e554a293a1e807a12..074875039e47a29a77ddca4397ca284767047d49 100644 (file)
--- a/debian/changelog
+++ b/debian/changelog
- Adapted versioned build-dep on libjs-jquery-ui to the workaround used by
that package (1.8.14 -> 1.8.ooops.14). Thanks to Christoph Anton
Mitterer for reporting this (Closes: #683100).
+ * debian/patches/:
+ - adjust-template-path: Fixed the patch for empty templates.d and some
+ versions of glob() which in this case returns nothing resulting in PHP
+ syntax errors and a crash of PNP4Nagios; thanks to Christoph Anton
+ Mitterer for reporting this and pointing out a fix (Closes: #683138).
-- Sebastian Harl <tokkee@debian.org> Wed, 01 Aug 2012 13:05:54 +0200
index 263d9b5f11c3cba6359d1d2724dbdd1ac9a918d2..15bcf6a868cdac623bf5a37f82e3ed5ea98482f9 100644 (file)
--- a/sample-config/pnp/config.php.in
+++ b/sample-config/pnp/config.php.in
-@@ -214,12 +214,15 @@
+@@ -214,12 +214,18 @@
# Add your own template directories here
# First match wins!
#$conf['template_dirs'][] = '/usr/local/check_mk/pnp-templates';
-$conf['template_dirs'][] = '@datarootdir@/templates';
+$conf['template_dirs'][] = '@sysconfdir@/templates';
-+foreach (glob("/etc/pnp4nagios/templates.d/*", GLOB_ONLYDIR) as $dirname) {
-+ $conf['template_dirs'][] = "$dirname";
++$templates_d = glob("/etc/pnp4nagios/templates.d/*", GLOB_ONLYDIR);
++if (is_array($templates_d) && (count($templates_d) > 0)) {
++ foreach ($templates_d as $dirname) {
++ $conf['template_dirs'][] = "$dirname";
++ }
+}
$conf['template_dirs'][] = '@datarootdir@/templates.dist';