Sha256: bf32a77eb486d412ab80ae273486a6c6ef114d536f26ab5710ed9f2114d9b929

Contents?: true

Size: 300 Bytes

Versions: 8

Compression:

Stored size: 300 Bytes

Contents

module Reactor
  module Sudo
    def self.su(other_user_name)
      rsession           = Reactor::Session.instance
      current_user_name  = rsession.user_name
      rsession.user_name = other_user_name
      yield
    ensure
      rsession.user_name = current_user_name || "root"
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
infopark_reactor-1.29.1 lib/reactor/sudo.rb
infopark_reactor-1.29.0 lib/reactor/sudo.rb
infopark_reactor-1.28.0 lib/reactor/sudo.rb
infopark_reactor-1.27.0.rc10 lib/reactor/sudo.rb
infopark_reactor-1.27.0.rc9 lib/reactor/sudo.rb
infopark_reactor-1.27.0.rc8 lib/reactor/sudo.rb
infopark_reactor-1.27.0.rc7 lib/reactor/sudo.rb
infopark_reactor-1.27.0.rc4 lib/reactor/sudo.rb