diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-04 17:29:16 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-04 17:29:16 +0000 |
commit | 5d42cd51a3502518a5d0a22928a133768dcaeb1a (patch) | |
tree | 599b4ae12a957e141fc114364e5e342102045c9a /lib/puppet/util.rb | |
parent | c8be52b7a9d95c1efcdb8df4ee88ae3f65c6f2df (diff) | |
download | puppet-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/util.rb')
-rw-r--r-- | lib/puppet/util.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/puppet/util.rb b/lib/puppet/util.rb index 1d4515b3d..e842ffd3f 100644 --- a/lib/puppet/util.rb +++ b/lib/puppet/util.rb @@ -16,6 +16,13 @@ module Util olduid = nil oldgid = nil + # If they're running as a normal user, then just execute as that same + # user. + unless Process.uid == 0 + yield + return + end + begin # the groupid, if we got passed a group # The gid has to be changed first, because, well, otherwise we won't |