summaryrefslogtreecommitdiffstats
path: root/lib/puppet
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 /lib/puppet
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
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/type/yumrepo.rb5
-rw-r--r--lib/puppet/util/inifile.rb1
2 files changed, 5 insertions, 1 deletions
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