[ANN] setuidruby-1.0.0

A

Ara.T.Howard

URI

http://codeforpeople.com/lib/ruby/setuidruby/

SYNOPSIS

- setuidruby is a wrapper on ruby which will run ruby as another user

- to compile

make

or, __only__ if you __know__ what you are doing

make mode=6777

- the user under which to execute ruby and an optional path to a ruby
interpreter must be specified as the first argument to setuidruby. for
example:

[ahoward@localhost setuidruby-0.0.0]$ cat ./a.rb
require "yaml"

y 'euid' => Process::euid,
'uid' => Process::uid,
'egid' => Process::egid,
'gid' => Process::gid

[ahoward@localhost setuidruby-0.0.0]$ setuidruby ahoward ./a.rb
---
egid: 500
gid: 500
euid: 500
uid: 500

[ahoward@localhost setuidruby-0.0.0]$ setuidruby jsherry:/usr/bin/ruby182 ./a.rb
---
egid: 510
gid: 510
euid: 509
uid: 509

if the path to ruby, which must be absolute, is not specifed the compile
time default of /usr/bin/ruby is used.

obviously setuidruby can be used in a shebang line:

[ahoward@localhost setuidruby-0.0.0]$ cat b.rb
#! /usr/bin/setuidruby ahoward:/usr/bin/ruby190
require "yaml"

y 'euid' => Process::euid,
'uid' => Process::uid,
'egid' => Process::egid,
'gid' => Process::gid

[ahoward@localhost setuidruby-0.0.0]$ ./b.rb
---
egid: 500
gid: 500
euid: 500
uid: 500


- this program could be __very__ dangerous to your system's health: use
wisely. you are responsible.


enjoy.


-a
--
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| anything that contradicts experience and logic should be abandoned.
| -- h.h. the 14th dalai lama
===============================================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top