[DRE-commits] [redmine] 02/03: gemfile-adjustments.patch: avoid opening database configuration that are not readable
Antonio Terceiro
terceiro at moszumanska.debian.org
Sat Nov 12 21:06:26 UTC 2016
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch debian/jessie
in repository redmine.
commit 479906276da70bc5026a2e2af2b554b851a7e469
Author: Antonio Terceiro <terceiro at debian.org>
Date: Sun Jun 12 21:25:42 2016 -0300
gemfile-adjustments.patch: avoid opening database configuration that are not readable
Closes: #826663
---
debian/changelog | 2 ++
debian/patches/gemfile-adjustments.patch | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 907a732..6c267af 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ redmine (3.0~20140825-8~deb8u4) UNRELEASED; urgency=medium
* debian/postinst: handle dependency check failure when triggered, to avoid
breaking in the middle of dist-upgrades.
+ * gemfile-adjustments.patch: avoid opening database configuration that are
+ not readable (Closes: #826663)
-- Antonio Terceiro <terceiro at debian.org> Sun, 12 Jun 2016 21:10:04 -0300
diff --git a/debian/patches/gemfile-adjustments.patch b/debian/patches/gemfile-adjustments.patch
index 0db0aa3..f38d5e3 100644
--- a/debian/patches/gemfile-adjustments.patch
+++ b/debian/patches/gemfile-adjustments.patch
@@ -45,7 +45,7 @@
-if File.exist?(database_file)
+seen_adapters = {}
+Dir['{config,/etc/redmine/*}/database.yml'].select do |f|
-+ File.exists?(f)
++ File.readable?(f)
+end.each do |database_file|
database_config = YAML::load(ERB.new(IO.read(database_file)).result)
adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/redmine.git
More information about the Pkg-ruby-extras-commits
mailing list