summaryrefslogtreecommitdiffstats
path: root/lib/puppet/config.rb
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-04-04 17:29:16 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-04-04 17:29:16 +0000
commit5d42cd51a3502518a5d0a22928a133768dcaeb1a (patch)
tree599b4ae12a957e141fc114364e5e342102045c9a /lib/puppet/config.rb
parentc8be52b7a9d95c1efcdb8df4ee88ae3f65c6f2df (diff)
downloadpuppet-5d42cd51a3502518a5d0a22928a133768dcaeb1a.tar.gz
puppet-5d42cd51a3502518a5d0a22928a133768dcaeb1a.tar.xz
puppet-5d42cd51a3502518a5d0a22928a133768dcaeb1a.zip
Fixing the class file to actually store class names, not object ids. Also added tests to make sure it all stays that way.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1063 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/config.rb')
-rw-r--r--lib/puppet/config.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/puppet/config.rb b/lib/puppet/config.rb
index 303c45ed9..5519138fd 100644
--- a/lib/puppet/config.rb
+++ b/lib/puppet/config.rb
@@ -545,7 +545,13 @@ Generated on #{Time.now}.
raise ArgumentError, "Default %s is not a file" % default
end
- Puppet::Util.asuser(obj.owner, obj.group) do
+ chown = nil
+ if Process.uid == 0
+ chown = [obj.owner, obj.group]
+ else
+ chown = [nil, nil]
+ end
+ Puppet::Util.asuser(*chown) do
mode = obj.mode || 0640
if args.empty?