diff options
author | erikh <erikh@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-22 17:19:02 +0000 |
---|---|---|
committer | erikh <erikh@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-22 17:19:02 +0000 |
commit | 6f11dee740e6e9ebc5fffed779212d24584ce6c4 (patch) | |
tree | 75f266040521abfc23df7e458e8fea8bd4748d2e /lib/puppet.rb | |
parent | 320ac389de52e67283fbe455a3ec6917bdd3a348 (diff) | |
download | puppet-6f11dee740e6e9ebc5fffed779212d24584ce6c4.tar.gz puppet-6f11dee740e6e9ebc5fffed779212d24584ce6c4.tar.xz puppet-6f11dee740e6e9ebc5fffed779212d24584ce6c4.zip |
+ Puppet::SUIDManager - This replaces all calls to the built-in ruby 'Process' library for uid/gid/euid/egid operations, including (not surprisingly) Puppet::Util#asuser and a method to run commands and capture output. This is due to many inconsistencies (through bugfixes) between ruby versions in the 1.8.x branch. This is included in the core puppet library and can be used by all puppet types and providers.
! Modified Puppet::Util#uid to check (and warn) if passed a nil value.
! Changes to use Puppet::SUIDManager instead of Process and relevant Puppet::Util calls.
! Removed Puppet::Util#asuser.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1666 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet.rb')
-rw-r--r-- | lib/puppet.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/puppet.rb b/lib/puppet.rb index f6debc0b1..e0d8a8e6c 100644 --- a/lib/puppet.rb +++ b/lib/puppet.rb @@ -5,6 +5,7 @@ require 'puppet/event-loop' require 'puppet/util' require 'puppet/log' require 'puppet/config' +require 'puppet/suidmanager' #------------------------------------------------------------ # the top-level module @@ -74,7 +75,7 @@ module Puppet # use basedirs that are in the user's home directory. conf = nil var = nil - if self.name == "puppet" and Process.uid != 0 + if self.name == "puppet" and Puppet::SUIDManager.uid != 0 conf = File.expand_path("~/.puppet") var = File.expand_path("~/.puppet/var") else |