summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2009-02-11 08:48:27 +1100
committerJames Turnbull <james@lovedthanlost.net>2009-02-11 08:48:27 +1100
commit535fa89af0b87f1d514d75040c1da7795d1dc87e (patch)
tree7342e61e5e897fa51de5b9b6fc29627024c85a42
parentf7b04dfc7e7859bf80243a39f778c32baa67061b (diff)
downloadpuppet-535fa89af0b87f1d514d75040c1da7795d1dc87e.tar.gz
puppet-535fa89af0b87f1d514d75040c1da7795d1dc87e.tar.xz
puppet-535fa89af0b87f1d514d75040c1da7795d1dc87e.zip
Fixed #1538 - Yumrepo sets permissions wrongly on files in /etc/yum.repos.d
-rw-r--r--CHANGELOG2
-rw-r--r--lib/puppet/type/yumrepo.rb5
-rw-r--r--lib/puppet/util/inifile.rb1
3 files changed, 7 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 619629a4a..8721c61a2 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,6 @@
0.24.8
+ Fixed #1538 - Yumrepo sets permissions wrongly on files in /etc/yum.repos.d
+
Fixed #1936 - Added /* */ support to the vim file
Fixed #1541 - nagios objects write files to clientbucket on every change
diff --git a/lib/puppet/type/yumrepo.rb b/lib/puppet/type/yumrepo.rb
index 15e031945..164deaffc 100644
--- a/lib/puppet/type/yumrepo.rb
+++ b/lib/puppet/type/yumrepo.rb
@@ -177,7 +177,10 @@ module Puppet
# Store all modifications back to disk
def self.store
- inifile.store
+ file = inifile.store
+ unless file.nil?
+ File.chmod(0644, file)
+ end
end
def self.clear
diff --git a/lib/puppet/util/inifile.rb b/lib/puppet/util/inifile.rb
index 9f5582e95..f5fab8530 100644
--- a/lib/puppet/util/inifile.rb
+++ b/lib/puppet/util/inifile.rb
@@ -163,6 +163,7 @@ module Puppet::Util::IniConfig
end
if dirty
Puppet::Util::FileType.filetype(:flat).new(file).write(text)
+ return file
end
end
end