From: "Ara.T.Howard" Date: 2005-11-07T13:43:16+09:00 Subject: [ANN] setuidruby-1.0.0 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 ===============================================================================