summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md8
-rw-r--r--lib/facter/facter_dot_d.rb6
-rw-r--r--metadata.json2
3 files changed, 12 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c66734e..84c8b24 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,11 @@
+##2015-01-14 - Supported Release 4.5.1
+###Summary
+
+This release changes the temporary facter_dot_d cache locations outside of the /tmp directory due to a possible security vunerability. CVE-2015-1029
+
+####Bugfixes
+- Facter_dot_d cache will now be stored in puppet libdir instead of tmp
+
##2014-12-15 - Supported Release 4.5.0
###Summary
diff --git a/lib/facter/facter_dot_d.rb b/lib/facter/facter_dot_d.rb
index 2c096b0..b058437 100644
--- a/lib/facter/facter_dot_d.rb
+++ b/lib/facter/facter_dot_d.rb
@@ -15,7 +15,7 @@
class Facter::Util::DotD
require 'yaml'
- def initialize(dir="/etc/facts.d", cache_file="/tmp/facts_cache.yml")
+ def initialize(dir="/etc/facts.d", cache_file=File.join(Puppet[:libdir], "facts_dot_d.cache"))
@dir = dir
@cache_file = cache_file
@cache = nil
@@ -23,7 +23,7 @@ class Facter::Util::DotD
end
def entries
- Dir.entries(@dir).reject{|f| f =~ /^\.|\.ttl$/}.sort.map {|f| File.join(@dir, f) }
+ Dir.entries(@dir).reject { |f| f =~ /^\.|\.ttl$/ }.sort.map { |f| File.join(@dir, f) }
rescue
[]
end
@@ -113,7 +113,7 @@ class Facter::Util::DotD
def cache_save!
cache = load_cache
- File.open(@cache_file, "w", 0600) {|f| f.write(YAML.dump(cache)) }
+ File.open(@cache_file, "w", 0600) { |f| f.write(YAML.dump(cache)) }
rescue
end
diff --git a/metadata.json b/metadata.json
index 09ad4e8..27def9c 100644
--- a/metadata.json
+++ b/metadata.json
@@ -1,6 +1,6 @@
{
"name": "puppetlabs-stdlib",
- "version": "4.5.0",
+ "version": "4.5.1",
"author": "puppetlabs",
"summary": "Standard library of resources for Puppet modules.",
"license": "Apache-2.0",