summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util.rb
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-11-16 21:39:31 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-11-16 21:39:31 +0000
commitd5bd1bc50730a42f16d3ed23a435d219c0bec3a6 (patch)
treef7969ee06f222370e230eb6d279835ad856cd3ba /lib/puppet/util.rb
parenta4562bfba94d18da54ad9560245d0669cc151c76 (diff)
downloadpuppet-d5bd1bc50730a42f16d3ed23a435d219c0bec3a6.tar.gz
puppet-d5bd1bc50730a42f16d3ed23a435d219c0bec3a6.tar.xz
puppet-d5bd1bc50730a42f16d3ed23a435d219c0bec3a6.zip
Mostly fixing exec so it either captures stderr or runs as a user; Process.euid was not working correctly
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@743 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/util.rb')
-rw-r--r--lib/puppet/util.rb16
1 files changed, 2 insertions, 14 deletions
diff --git a/lib/puppet/util.rb b/lib/puppet/util.rb
index 6169bde81..e5179a587 100644
--- a/lib/puppet/util.rb
+++ b/lib/puppet/util.rb
@@ -19,9 +19,9 @@ module Util
if group.is_a?(Integer)
gid = group
else
- unless obj = Puppet::Type::Group[user]
+ unless obj = Puppet::Type::Group[group]
obj = Puppet::Type::Group.create(
- :name => user,
+ :name => group,
:check => [:gid]
)
end
@@ -85,18 +85,6 @@ module Util
return retval
end
- # Capture stderr of a block
- def self.capture_stderr
- require 'stringio'
- begin
- $stderr = StringIO.new
- yield
- $stderr.rewind && $stderr.read
- ensure
- $stderr = STDERR
- end
- end
-
# Create instance methods for each of the log levels. This allows
# the messages to be a little richer. Most classes will be calling this
# method.