[#74812] Drag and Drop in Windows with Explorer — Tom Felker <tcfelker@...>
I need to make a Windows program with RXRuby that batch processes audio
[#74824] Please read carefully — Ata Oyima <ataoyima55@...>
FROM: MR. ATA OYIMA
[#74825] Millisecond in time. — place4oracle@... (Warren)
Hi,
Warren wrote:
Harry Ohlsen wrote:
On Tue, Jul 01, 2003 at 07:28:48PM +0900, Anders Borch wrote:
Given that we're talking about modulo arithmetic :-) ...
>>>>> "H" == Harry Ohlsen <harryo@qiqsolutions.com> writes:
ts wrote:
>>>>> "H" == Harry Ohlsen <harryo@qiqsolutions.com> writes:
[#74829] inifinity recursion && test/unit — Andrey Kulinich <Andrey.Kulinich@...>
Without test/unit ruby finished work and said that stack level too deep.
On Tue, Jul 01, 2003 at 05:34:06PM +0900, Andrey Kulinich wrote:
On Tue, Jul 01, 2003 at 08:38:42PM +0900, Andrey Kulinich wrote:
[#74837] Sorting a Hash — oadartse@... (Osuka)
I'm Having some trouble sorting a hash!, the hash contents are like
[#74853] Aeditor-0.1 is unleashed — "Simon Strandgaard" <0bz63fz3m1qt3001@...>
Aeditor is a editor-widget written in Ruby. The primary
On Tue, 01 Jul 2003 15:32:24 +0200, Simon Strandgaard wrote:
[#74865] DBD::Oracle9 and non-blocking mode — Jim Cain <list@...>
I'm about ready to make available an early copy of my library, but first
On Wed, Jul 02, 2003 at 01:04:00AM +0900, Jim Cain wrote:
[#74866] IP arithmetic — Brian Candler <B.Candler@...>
Are there any functions in the Ruby standard library which convert
[#74884] Speaking of I18N... — "Hal E. Fulton" <hal9000@...>
I don't suppose anyone has implemented any
Hal E. Fulton wrote:
[#74894] rb_gc() and scan stack — "Simon Strandgaard" <0bz63fz3m1qt3001@...>
I were experimenting with Init_stack, when I discovered a flaw in my mind.
[#74909] FXDataTarget not updating my variable — Hans Fugal <fugalh@...>
I have the following:
[#74912] Ruby9i now available — Jim Cain <list@...>
All,
In article <3F026D44.7090802@jimcain.us>, Jim Cain <list@jimcain.us> wrote:
[#74934] Question about streaming on Ruby — "Rob" <robson@...>
I have a problem which I even don't know where to start.
[#74962] Base of Numbers — volker_grabsch@... (Volker Grabsch)
Hello Folks!
Sorry, small self-correction:
[#74969] Vote for Ruby in Linux Journal Poll — "Yannick Foll" <yfoll@9online.fr>
http://www.linuxjournal.com/rc2003/
[#74980] OT: It's that time of year again ... — james_b <james_b@...>
Happy Birthmonth to all fellow Rubyists born in July!
-----BEGIN PGP SIGNED MESSAGE-----
Saluton!
----- Original Message -----
[#75023] A Quick Guide to SQLite and Ruby — why the lucky stiff <ruby-talk@...>
-Talkers:
Awesome!
Richard Kilmer (rich@infoether.com) wrote:
At 11:32 +0900 7/3/03, why the lucky stiff wrote:
Paul DuBois wrote:
"Curt Hibbs" <curt@hibbs.com> wrote in message news:<INEGJNJOFAMNDPNEABNEEECHHAAA.curt@hibbs.com>...
[#75042] Auto-serialization (as in Vapor, sql-serialize, etc.): detecting changes to instance variables — Jim Cain <list@...>
All,
Jim Cain wrote:
[#75052] Ruby and Windows interaction — Kingsley Hendrickse <KHendric@...>
Hi
[#75068] rjni: Java binding for Ruby through JNI -- tech. preview — Mauricio Fern疣dez <batsman.geo@...>
[#75104] rb_gc_mark(): unknown data type...non object — Jim Cain <list@...>
I figure I'm getting this because I've got a VALUE that's not a Ruby
[#75118] Ruby, Threads and Processes — gm@... (George Moschovitis)
Hello everybody,
[#75119] purpose of replace method — Ian Macdonald <ian@...>
Hi,
Ian Macdonald wrote:
On Sat, Jul 05, 2003 at 05:58:37AM +0900, Nigel Gilbert wrote:
[#75128] RAA Modules and Ruby 1.8 — Stefan Arentz <stefan.arentz@...>
[#75137] How to create Shell Links on Windows? — Timon Christl <me@...>
Is there an easy way to create or modify shell links (.lnk) with ruby on
----- Original Message -----
[#75142] Stuck with Telnet still — Kingsley Hendrickse <KHendric@...>
Hi
[#75160] seeking feedback on my first Ruby program — "Joe Cheng" <code@...>
I just took my first stab at writing a useful Ruby program. My programming
How do I get access to what's in $stderr in the form of a string?
[#75167] Using ruby-pam in a CGI — Samuel Tesla <samuel@...>
I'm looking at writing some simple control panel software for my
[#75193] Ruby Code Snippet: Array.count — Stefan Arentz <stefan.arentz@...>
Stefan Arentz wrote:
On Sat, 05 Jul 2003 14:20:35 +0900, Dave Thomas wrote:
[#75254] unclose 0.1 alpha — Koen Vervloesem <koen.vervloesem@...>
Hi,
Koen Vervloesem wrote:
il Sun, 6 Jul 2003 04:21:48 +0900, Joel VanderWerf
[#75271] confirmation — <TristanWW@...>
Confirmation for ruby-talk@ruby-lang.org
[#75295] Freezing an arbitary object — "Aryeh M. Frierdman" <aryeh@...>
Lets say I am doing design by contract and want to do a call like this:
[#75307] Need regex to match "^\n" — Jim Freeze <jim@...>
Hi:
On 2003.07.07, Jim Freeze <jim@freeze.org> wrote:
[#75325] trapping compile time errors — "Gerard A.W. Vreeswijk" <gv@...>
Hi,
[#75336] Ruby books — jolsen@... (Jesper Olsen)
What is the best book for learning Ruby (Ruby specifically, not
[#75343] Marshaling objects partially — Ronald Pijnacker <rhp@...>
Hi!
Hi,
> Hi,
> > Hi,
>>>>> "R" == Ronald Pijnacker <rhp@dse.nl> writes:
[#75352] ModRuby / Apache2.0 worker mpm — gm@... (George Moschovitis)
Hi there,
[#75363] People in/near Austin, Texas? — "Hal E. Fulton" <hal9000@...>
Who here is in or near Austin, Texas?
----- Original Message -----
[#75364] Integer method? — internetletter@... (s moon)
I found following exp from html_parser.rb
[#75365] : Using Events — Steve Tuckner <STUCKNER@...>
Hello all,
[#75369] Code Snippet: Array.shuffle — Stefan Arentz <stefan.arentz@...>
On Wed, Jul 09, 2003 at 08:50:59PM +0900, Joe Gwozdecki wrote:
On Wed, Jul 09, 2003 at 09:35:22PM +0900, Brian Candler wrote:
On Wed, Jul 09, 2003 at 09:45:33PM +0900, Mauricio Fern疣dez wrote:
[#75404] Integrations tests and $: — Jim Freeze <jim@...>
Hi:
[#75415] rubygarden.org FAQ broken — Eric Schwartz <emschwar@...>
I sent this mail to <webmaster@rubygarden.org>, but apparently that
[#75420] My brief and torrid affair with Ruby. — Ray Cote <rgacote@...>
Hi List:
-----BEGIN PGP SIGNED MESSAGE-----
At 9:08 AM +0900 7/9/03, Daniel Carrera wrote:
-----BEGIN PGP SIGNED MESSAGE-----
They don't call GPL a legal virus for nothing:
Stephyn Butcher wrote:
-----BEGIN PGP SIGNED MESSAGE-----
* Daniel Carrera <dcarrera@math.umd.edu> [0714 03:14]:
Rasputin wrote:
----- Original Message -----
-----BEGIN PGP SIGNED MESSAGE-----
> > Are you honestly saying that you don't understand
-----BEGIN PGP SIGNED MESSAGE-----
Sorry for this long post and rambling. Just skip if you're not in
-----BEGIN PGP SIGNED MESSAGE-----
Austin Ziegler <austin@halostatue.ca> skrev den Thu, 10 Jul 2003 10:10:03
"Josef 'Jupp' Schugt" <jupp@gmx.de> wrote in message
On Sat, 12 Jul 2003 09:39:06 +0900, Sean O'Dell wrote:
-----BEGIN PGP SIGNED MESSAGE-----
"Daniel Carrera" <dcarrera@math.umd.edu> wrote in message
-----BEGIN PGP SIGNED MESSAGE-----
----- Original Message -----
-----BEGIN PGP SIGNED MESSAGE-----
* Daniel Carrera <dcarrera@math.umd.edu> [0705 21:05]:
OK, Daniel, let's put it this way: if you do not use something there's
-----BEGIN PGP SIGNED MESSAGE-----
> GPL code imposes a condition upon its use that some people don't like.
-----BEGIN PGP SIGNED MESSAGE-----
"Samuel Tesla" <samuel@alieniloquent.com> wrote in message
On Thu, 10 Jul 2003 05:17:48 +0900, Daniel Carrera
On Fri, 11 Jul 2003 08:50:18 +0900, Daniel Carrera
I don't believe the GPL is specific about the library sharing the same
[#75438] NASA using Ruby? — Harry Ohlsen <harryo@...>
I noticed a reference in the intro blurb for Dave Thomas's talk at OSCON to NASA doing numerical simulations using Ruby.
On Thu, 10 Jul 2003 04:20:40 +0900, Hal E. Fulton wrote:
On Wednesday 09 July 2003 1:52 pm, Simon Strandgaard wrote:
On Wednesday 09 July 2003 01:38 pm, Tom Felker wrote:
[#75445] Possible use for a continuation? [Generating all factors of a given number] — Harry Ohlsen <harryo@...>
Imagine I have an array of arrays, representing the prime factorisation of a number.
daz wrote:
[#75449] Clarifiction needed about versions — mkcon@... (Martin Kahlert)
Hi!
on 7/9/03 2:08 AM, Martin Kahlert at mkcon@gmx.de wrote:
[#75456] Building Ruby 1.8 preview 3 — "Gavin Sinclair" <gsinclair@...>
Folks,
> Creating library file: libcygwin-ruby18.dll.a
patrick zesar (jonnypichler@gmx.net) wrote:
On Wednesday, July 9, 2003, 8:26:08 PM, Gour wrote:
[#75458] Re: Array.each — "Pe, Botp" <botp@...>
Brian Candler [mailto:B.Candler@pobox.com] wrote:
On Wed, Jul 09, 2003 at 05:56:38PM +0900, "Pe, Botp" wrote:
>>>>> "B" == Brian Candler <B.Candler@pobox.com> writes:
On Wed, Jul 09, 2003 at 06:47:45PM +0900, ts wrote:
>>>>> "B" == Brian Candler <B.Candler@pobox.com> writes:
On Wed, 2003-07-09 at 06:08, ts wrote:
>>>>> "G" == Guillaume Marcais <guslist@free.fr> writes:
[#75512] build problems with 1.8, solaris and sparc options — Daniel Berger <djberge@...>
Hi all,
[#75570] Ruby T-Shirt Idea — shout@... (Austin King)
Keywords: advocacy, silly t-shirts, Request For Feedback
----- Original Message -----
On Thu, Jul 10, 2003 at 12:38:10PM +0900, Hal E. Fulton wrote:
-----BEGIN PGP SIGNED MESSAGE-----
[#75591] Linguistics-1.01 — Michael Granger <ged@...>
Hi fellow Rubyists,
[#75631] OSCON "Ruby in a day" Dave's slides — Pierre Baillet <oct@...>
Hi,
[#75636] Re: OT: GPL - was Re: My brief and torrid affair with Ruby. — "David Douthitt" <DDouthitt@...>
If you want the least restrictive "license" available, then your work
[#75651] OSCON report — ptkwt@...1.aracnet.com (Phil Tomson)
Matz's talk "The Power and Philosophy of Ruby " was standing room only
[#75654] Re: Ruby T-Shirt Idea — "Orion Hunter" <orion2480@...>
What we need is a code snippet that is excessively long and obfuscate in
----- Original Message -----
Bermejo, Rodrigo graced us by uttering:
Saluton!
[#75696] A Ruby XSL stylesheet for DocBook? — Jim Cain <list@...>
I'm writing documentation for my Oracle library, and I was wondering if
On Fri, 11 Jul 2003 08:54:59 +0900, Jim Cain wrote:
Austin Ziegler wrote:
On Fri, 11 Jul 2003 11:35:31 +0900, Jim Cain wrote:
[#75708] Regular expression contradiction — "Gavin Sinclair" <gsinclair@...>
Folks,
[#75730] RubyCocoa 0.4.0 path [?] Issue — Stephyn Butcher <tendzin.dorje@...>
Any Mac OS X/Ruby users out there?
[#75765] cgi.rb broken in Ruby 1.8.0 p3 — gm@... (George Moschovitis)
Hi there,
[#75767] Getting my IP address — Philip Mak <pmak@...>
Is there a piece of Ruby code somewhere that will tell me what my IP
ts <decoux@moulon.inra.fr> wrote in message news:<200307121340.h6CDeV804312@moulon.inra.fr>...
[#75774] Ruby & Cyrillic (Russian encodings) — Armin Roehrl <armin@...>
Hi,
[#75777] Re: OSCON report — "Volkmann, Mark" <Mark.Volkmann@...>
> -----Original Message-----
Hi,
On Sat, 12 Jul 2003, Yukihiro Matsumoto wrote:
[#75788] Re: [OT] Humans and dictionaries (was Re: My brief and torrid aff airwith Ruby.) — "Womick, Don" <don.womick@...>
I don't know... "pro-choice" carries even more baggage than "viral",
Womick, Don wrote:
[#75790] Ruby talk from LL2 — Stefan Arentz <stefan.arentz@...>
[#75800] cross-corr time/array lag problem — qubert@... (Qubert)
I am starting to find the "Way" now, but I have a problem.
[#75818] do...end vs. begin..end — "Kurt M. Dresner" <kdresner@...>
I realize what the difference between these two block delimiters is, but
[#75838] Ruby LISP-ish stuff — "Moses Hall" <moses@...>
I was wondering if there are plans to add some of the more useful LISP
[#75846] Ruby on an embedded ARM processor — Ben Giddings <ben@...>
Hi all,
[#75852] ruby-mysql library load error — eric.anderson@... (Eric Anderson)
I am trying to get the ruby dbi library up and running on my machine.
As Brian Candler pointed out, what I posted is not what I meant to
I'm not certain if this is a case of the blind leading the blind
[#75913] abnormal program termination with dynamic data, but not with fixed data — walter@...
hi everyone. I am stumped!
[#75952] programming a bird -- yes! — gv@... (Gerard A.W. Vreeswijk)
Hello all,
[#75958] OSSL 0.2.0-pre3 — Michal Rokos <m.rokos@...>
Hello folks,
Hi,
On Tue, Jul 15, 2003 at 03:06:28AM +0900, Yukihiro Matsumoto wrote:
In message <20030715091319.GH30869@sam-solutions.net>,
On Wed, Jul 16, 2003 at 06:34:21PM +0900, GOTOU Yuuzou wrote:
[#75963] Custom method_missing doesn't trap super call — Richard Dale <Richard_Dale@...>
When I run the code below it produces the following output:
Yukihiro Matsumoto wrote:
In message "Re: Custom method_missing doesn't trap super call"
Yukihiro Matsumoto wrote:
Yukihiro Matsumoto wrote:
Brian Candler wrote:
[#75967] help - calling methods in a hash with parameters — Tuan Bui <tuanbui@...>
Hiya,
[#75975] Booleans — "Mark J. Reed" <markjreed@...>
Okay, as a convert from Perl to Ruby, I have to say that I love
[#75991] ruby-specific CGI question (I think) — "Kurt M. Dresner" <kdresner@...>
I'm using sessions and forms in my cgi script.
----- Original Message -----
On Tue, Jul 15, 2003 at 10:45:52AM +0900, Hal E. Fulton wrote:
Here's my code folks. Again, I don't profess to have anything that is
On Tue, Jul 15, 2003 at 11:10:55AM +0900, Kurt M. Dresner wrote:
[#76058] How to reduce Ruby runtime error? — Xiangrong Fang <xrfang@...>
Hi my friends,
----- Original Message -----
[#76074] += vs << when appending arrays to an array — Doug Beaver <doug@...>
hello,
[#76083] Using threads to obtain a value — kapheine@... (Zachary P. Landau)
I have a few classes that all try to obtain the same data as each
[#76088] how to temporaly change enviroment variable — Roman Dolgov <roman_dolgov@...>
Hi All,
[#76104] Ruby developers — "maillist@..." <maillist@...>
Hi,
[#76117] soap4r 1.4.8.1 with REXML 2.7.1 - no REXML::VERSION_MAJOR — Damphyr <damphyr@...>
I grabbed the latest soap4r and had a go with the wsdl driver, only to
[#76121] Keyword "with" — "Robert Klemme" <bob.news@...>
Robert Klemme wrote:
Hrm, well I'm a Ruby/Java/C/C++/Python/Perl/Lisp/Javascript/PHP...
>
Brian Candler <B.Candler@pobox.com> wrote:
Peter (having a bad day) Hickman wrote:
----- Original Message -----
On Friday, July 18, 2003, 5:30:00 AM, Hal wrote:
On Saturday, July 19, 2003, at 03:08 AM, Gavin Sinclair wrote:
First, I simply don't agree with the statement that "x += 1" is a rarity
[#76135] Passing arguments to 'env ruby' on OS X — Jim Freeze <jim@...>
When using env on the shebang line,
[#76145] Advocacy: Ruby on/with .net — "Thomas Sondergaard" <thomass@...>
I'd like a minute or two of your time as I try to sell you the idea of ruby
On Mon, 21 Jul 2003 19:28:48 +0900, Mauricio Fern疣dez
Lothar Scholz <mailinglists@scriptolutions.com> wrote in message news:<1173309890.20030719135052@scriptolutions.com>...
[#76167] Re: Other languages' features in Ruby — "Mark J. Reed" <markjreed@...>
BG = Ben Giddings
[#76191] Test::Unit no tests specified — Chris Morris <chrismo@...>
I browsed the previous thread about this topic -- I'm in favor of
[#76196] OO Design question for Net::HTTP caching extension — Aredridel <aredridel@...>
I'm in the process of writing an HTTP-1.1 extension to Net::HTTP. At
On Thu, Jul 17, 2003 at 07:13:34AM +0900, Aredridel wrote:
[#76202] Togl widget, where to install it? — Massimiliano Mirra - bard <mmirra@...>
[#76206] callbacks in ruby and using yield in resursion — Paul <webmaster@...>
Hi,
[#76244] reliable way of finding Objects Class? — walter@...
Hi,
[#76249] nil_or_empty? on String — Chris Morris <chrismo@...>
I just threw down the following -- it smells like I'm over-complicating
[#76254] What's the point? — Jim Freeze <jim@...>
Hi
> I've known for some time that methods can be defined inside
[#76301] Re: New Ruby book — Jack Herrington <jack_d_herrington@...>
On Thursday, July 17, 2003, at 02:49 PM, Gennady wrote:
It looks very good, I went through sample chapters and was impressed how
Thanks!
On Fri, 18 Jul 2003 08:19, Jack Herrington wrote:
[#76317] Question re: graphics output of CGIs (mime-type issue?) — "Hal E. Fulton" <hal9000@...>
What's the proper way to deliver a grpahical
* Hal E. Fulton <hal9000@hypermetrics.com> [0728 01:28]:
[#76323] Marshal efficiency — "Gavin Sinclair" <gsinclair@...>
Folks,
[#76336] Aliased setter methods behave differently than other methods? — Jim Cain <list@...>
Here's another question... I am aliasing and redefining certain methods,
Hi,
nobu.nokada@softhome.net wrote:
[#76342] $HOME install — "Simon Strandgaard" <0bz63fz3m1qt3001@...>
One of my friends (Johan Gade) asked me this question:
[#76365] what happened to Block class? — dblack@...
Hello --
[#76368] Re: New Ruby book — "Albert Chou" <achou@...>
I think to be fair you need to try out BeanShell. I've played with it
[#76372] Binary counter — ptkwt@...1.aracnet.com (Phil Tomson)
I needed to test a class which had a certain number of 'binary' inputs (ie. each input
[#76389] Ruby Golf: Object Diff — "John W. Long" <ws@...>
The problem:
Hi Mauricio,
[#76396] chaining comparisons — "Kurt M. Dresner" <kdresner@...>
When I learned python I was overjoyed that I could evaluate 1 < 2 < 3
On Saturday, July 19, 2003, 3:58:51 PM, Kurt wrote:
On Sat, 19 Jul 2003 15:58:51 +0900, Kurt M. Dresner wrote:
On Sat, Jul 19, 2003 at 05:08:03PM +0900, Simon Strandgaard wrote:
On Sat, 19 Jul 2003 14:58:51 +0900
[#76424] Proposal: Array#to_h, to simplify hash generation — Gavin Sinclair <gsinclair@...>
Hi -talk,
Hi,
On Sunday, July 20, 2003, 1:31:42 AM, Yukihiro wrote:
Hi,
On Saturday, July 19, 2003, at 12:56 PM, Yukihiro Matsumoto wrote:
Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
Hi --
dblack@superlink.net wrote:
>
Hi --
On Monday, July 21, 2003, 8:18:50 PM, dblack wrote:
On Tue, 22 Jul 2003 00:59:50 +0900, Brian Candler wrote:
[#76428] Compiled win32ole 0.5.3? — "Chris Morris" <chrismo@...>
Anyone have a pre-compiled win32ole 0.5.3 available for download? I'm having
[#76442] dlopen is failing on Window XP works great on Window 2000 — Michael Davis <mdavis@...>
Hello,
[#76473] ruby documentation generator? — "Kurt M. Dresner" <kdresner@...>
I've been googling for a few minutes but I haven't found anything yet.
il Sun, 20 Jul 2003 12:29:28 +0900, Gavin Sinclair
il Mon, 21 Jul 2003 00:36:14 +0900, Austin Ziegler
[#76478] Pipeing Sockets — Pablo Lorenzzoni <spectra@...>
Hello ALL!
[#76497] Parsing POST and GET variables simultaneously? — David Heinemeier Hansson <david@...>
Isn't it possible to get variables from POST and GET simultaneously?
On Mon, Jul 21, 2003 at 12:39:08AM +0900, David Heinemeier Hansson wrote:
> Either way, you have to parse the string yourself, though. Identify
Somehow, despite the explicit instructions in my subject line,
[#76499] From Windows internal format to UTF-8? — "renoX" <renZYX@...>
Hello,
[#76551] matz thoughts on Rite ? — "Simon Strandgaard" <0bz63fz3m1qt3001@...>
I don't know much about Rite, therefore I ask.
On Tue, 22 Jul 2003 00:09:21 +0900, Yukihiro Matsumoto wrote:
> * will Rite use Mark&Sweep GC or something else ?
Hi,
[#76563] Deep copy — Jim Freeze <jim@...>
Hi
On Mon, 21 Jul 2003 18:31:21 +0200
[#76591] gsub(/\s*$/, "") doubling string — Paul Rubel <prubel@...>
Hello,
[#76619] Should String#strip take a parameter? — "Warren Brown" <wkb@...>
All,
Hi,
[#76625] RubyForge.org — Richard Kilmer <rich@...>
All,
On Tue, 22 Jul 2003 12:43:41 +0200, Oliver Bolzer wrote:
On Jul 24, Simon Strandgaard wrote:
> All,
On Tuesday 22 Jul 2003 3:38 am, Richard Kilmer wrote:
[#76630] Ruby interpreters for different platforms — "Kurt M. Dresner" <kdresner@...>
Okay guys, this is a bit of a stretch, but...
[#76647] callcc and insomnia — dolio@... (Dan Doel)
Hello,
[#76693] Bug report: ruby-1.8.0p3 fails to compile under FreeBSD-4.7 — Brian Candler <B.Candler@...>
gcc -fPIC -g -O2 -DDB_DBM_HSEARCH -DDBM_HDR="<db.h>" -I. -I/u/home/telinco/build/ruby/ruby-1.8.0 -I/u/home/telinco/build/ruby/ruby-1.8.0 -I/u/home/telinco/build/ruby/ruby-1.8.0/ext/dbm -DHAVE_DB_H -DHAVE_SYS_CDEFS_H -DHAVE___DB_NDBM_OPEN -DHAVE___DB_NDBM_CLEARERR -c dbm.c
Another (possible) problem with ruby-1.8.0p3
Hi,
[#76697] String substitution without RegEx — Andreas Schwarz <usenet@...>
I wanted to do a simple string substitution, and was surprised to see
[#76715] RegExp outermost () — Chris Morris <chrismo@...>
This may be a case where RegExp ain't the way to go, but I want to scan
Scripsit ille 暫hris Morrisォ <chrismo@clabs.org>:
[#76725] SMTP Date format? — Ben Giddings <ben@...>
Hey all,
Saluton!
On Wed July 23 2003 9:35 am, Josef 'Jupp' Schugt wrote:
[#76732] Ruby Spam Corpus — Daniel Carrera <dcarrera@...>
-----BEGIN PGP SIGNED MESSAGE-----
[#76751] New RDoc template, and a question — Dave Thomas <dave@...>
Michael Granger has produced a wonderful new RDoc template, which looks
On Wed, 23 Jul 2003 13:41:16 +0900, Dave Thomas <dave@pragprog.com>
On Wed, 23 Jul 2003 20:26:30 +0900, Jim Weirich wrote:
On Tue, 2003-07-22 at 22:41, Dave Thomas wrote:
Dave Thomas wrote:
On Tuesday, Jul 22, 2003, at 21:41 US/Pacific, Dave Thomas wrote:
[#76768] A different Version of Enumerable#inject — "Robert Klemme" <bob.news@...>
[#76783] Embedding problem - SEGV — Brian Candler <B.Candler@...>
I have a problem with embedding Ruby, which hopefully someone can shed some
>>>>> "B" == Brian Candler <B.Candler@pobox.com> writes:
On Wed, Jul 23, 2003 at 08:57:55PM +0900, ts wrote:
On Wed, Jul 23, 2003 at 08:49:38PM +0900, Brian Candler wrote:
[#76843] Re: [OT] subversion, was [ANN] RubyForge.org — "Bennett, Patrick" <Patrick.Bennett@...>
Hmm, the linuxworld article didn't really say anything useful about
On Thu, 24 Jul 2003 07:05:23 +0900, Bennett, Patrick wrote:
On Wed July 23 2003 5:28 pm, Simon Strandgaard wrote:
On Jul 24, Ben Giddings wrote:
[#76846] "regex literal in condition" — Daniel Carrera <dcarrera@...>
-----BEGIN PGP SIGNED MESSAGE-----
[#76870] Re: [OT] subversion, was [ANN] RubyForge.org — "Booth, Peter" <Peter.Booth@...>
For me, the deciding moment was after installed a demo version of Bitkeeper
[#76892] ruby 1.8.0 preview4 — matz@... (Yukihiro Matsumoto)
Hello,
On Thu, 2003-07-24 at 02:03, Yukihiro Matsumoto wrote:
On Thu, Jul 24, 2003 at 05:03:37PM +0900, Yukihiro Matsumoto wrote:
ossl_config.c:147: bad macro argument list
[#76896] Running a Ruby installation off a CD (under Windows) — Harry Ohlsen <harryo@...>
I've written some stuff I'd like to show to someone who doesn't already have Ruby installed.
[#76900] Re: [OT] subversion, was [ANN] RubyForge.org — "Bennett, Patrick" <Patrick.Bennett@...>
Well, for one, it only runs on Unix. That's a pretty big problem for
[#76910] Re: ruby 1.8.0 preview4 — "Berger, Daniel" <djberge@...>
More on preview4 warnings:
Hi,
Here are what IMO are the important warnings from FreeBSD-4.8, gcc version
[#76928] SWIG and char * parameters — Ben Giddings <ben@...>
I've just started to try to use SWIG to wrap a bunch of C functions so I can
[#76957] Packaging pure ruby files when using extconf.rb — Paul William <webmaster@...>
Hi,
>>>>> "P" == Paul William <webmaster@startlinux.co.nz> writes:
On Fri, Jul 25, 2003 at 04:27:47PM +0900, Paul William wrote:
On Fri, 2003-07-25 at 20:36, Mauricio Fern疣dez wrote:
[#76965] Add debug to help info — Robert Cowham <rc@...>
Is it just me or is how to debug a ruby script unnecessarily hidden?
[#76981] irb --readline — Wybo Dekker <wybo@...>
When I try to have readline support with:
Hi,
[#76984] Patches to 1.8.0p4 to add Bessel functions for those that have 'em — Mike Hall <mghall@...>
Here's some simple patches to configure.in, configure and math.c
Hi,
On Sat, Jul 26, 2003 at 01:41:35AM +0900, Yukihiro Matsumoto wrote:
[#76991] Confused about locking a file via file.flock(File::LOCK_EX) — Ludwigi Beethoven <aix_tech@...>
I am writing a ruby appl under AIX where I need to
>> Flock only works within the same process.
I guess I would have to grab the file and update it
On Sat, Jul 26, 2003 at 08:57:00PM +0900, Ludwigi Beethoven wrote:
[#76998] Trouble with inherited — Steve Tuckner <STUCKNER@...>
Anyone have an idea of why the following code doesn't work?
>>>>> "S" == Steve Tuckner <STUCKNER@MULTITECH.COM> writes:
What suggestion do you have to get information from the subclass that is
[#77007] Problem with class, struct, and to_s — Gavin Sinclair <gsinclair@...>
-talk,
[#77030] Euruko 03 - videos -- mirrors wanted; — Armin Roehrl <armin@...>
Hi all,
Armin Roehrl [mailto:armin@xss.de] wrote:
> BitTorrent (http://bitconjurer.org/BitTorrent/) might be ideal for this.
[#77032] Re: Slow ruby start up on XP — Yura Kloubakov <yura@...>
> -----Original Message-----
[#77036] UTF-8 -> iso8859-15 — Andreas Schwarz <usenet@...>
Simple Question: how can I convert UTF-8 strings (from REXML) to
[#77045] Quick way to find all drives in a windows box — Damphyr <damphyr@...>
Does anyone have a quick and elegant :) way to find all available drive
[#77082] Set doesn't have [] instance method — Gavin Sinclair <gsinclair@...>
It should, shouldn't it? It's meant to combine the fast lookup of
On Sunday, July 27, 2003, 3:28:06 AM, Gavin wrote:
On Sun, Jul 27, 2003 at 11:08:27AM +0900, Gavin Sinclair wrote:
On Wed, Jul 30, 2003 at 11:07:02AM +0900, Mark J. Reed wrote:
[#77084] Re: [ANN] rGenetic — "Orion Hunter" <orion2480@...>
>Interesting. I've got some GA and ES (Evolution Strategy) code that I
[#77087] What's wrong with ruby garden? — "Carl Youngblood" <carl@...>
It seems that Ruby Garden is down right now. Does anyone know what's
[#77091] YAML in Five Minutes — why the lucky stiff <ruby-talk@...>
Perhaps you've heard that Ruby 1.8.0 now includes YAML support, but
[#77094] How to rescue any exception in 1.8? — Philip Mak <pmak@...>
This code will catch the exception in Ruby 1.6:
[#77109] API changes in 1.8.0 — Brian Candler <B.Candler@...>
Has anyone written a summary of API changes between 1.6.8 and 1.8.0? If not,
[#77120] Your Assistance: — "James Kabila" <jameskabila@...>
From: James Kabila
[#77129] Ruby in Ruby — Austin Ziegler <austin@...>
Over on the pragprog list, Ron Jeffries suggested that it might be
On Mon, 28 Jul 2003, Austin Ziegler wrote:
On Wed, 30 Jul 2003 11:15:18 +0900, Robert Klemme wrote:
[#77136] irbrc location under windows — "Emmanuel Touzery" <emmanuel.touzery@...>
Hello,
[#77144] ruby 1.8.0 preview5 — matz@... (Yukihiro Matsumoto)
Hello,
[#77149] winsock problem? — Xiangrong Fang <xrfang@...>
Hi,
On Mon, Jul 28, 2003 at 08:22:49PM +0900, Xiangrong Fang wrote:
Hi Brian,
>>>>> "X" == Xiangrong Fang <xrfang@hotmail.com> writes:
Hi,
>>>>> "X" == Xiangrong Fang <xrfang@hotmail.com> writes:
I tried the following, but unfortunately does not work:
>>>>> "X" == Xiangrong Fang <xrfang@hotmail.com> writes:
[#77157] install questions — "Hal E. Fulton" <hal9000@...>
I have been thinking about installation
[#77171] aSocket.select — Paul Argentoff <argentoff@...>
Dear All,
[#77176] Fishing for ideas: Ruby-talk for Java coders — Armin Roehrl <armin@...>
Hi all,
On Mon July 28 2003 1:06 pm, Armin Roehrl wrote:
[#77183] smtp.sendmail security — "John W. Long" <ng@...>
We are using the following code to send email messages from an online form
[#77187] Generating random numbers? — Harry Ohlsen <harryo@...>
Can someone remind me of the name for the class/method for generating random
[#77196] A Slashdot mention of RubyForge... — "Tom Copeland" <tom@...>
...can be found here:
[#77197] Parser generator — "Rodrigo B. de Oliveira" <rodrigob@...>
I'm evaluating language/frameworks for creating a toy language compiler =
Clifford Heath <cjh_nospam@managesoft.com> skrev den 31 Jul 2003 09:24:23
[#77199] RPM spec for ruby 1.8.0-preview5 for Mandrake. — John Carter <john.carter@...>
Here is an RPM spec for ruby 1.8.0-preview5 that works for Mandrake 9.
[#77206] Singletons as globals and GC — Ben Giddings <ben@...>
Although Ruby allows the use of global variables, I still prefer not to
[#77208] Documentation for standard library -- what format? — William Webber <wew@...>
Hi all!
[#77227] Warnings? — Tim Bates <tim@...>
Hi all,
Hi,
How about a way to trap warnings similar to rescue Exception so we can trap and suppress certain expected warnings?
Hi,
[#77290] Passing a method block to a parent class — eric.anderson@... (Eric Anderson)
If I have
[#77298] is it possible to pipe ruby to more / cat / arbitrary programs? — Tuan Bui <tuanbui@...>
Good morning,
[#77343] Re: Ruby could be wildly more popular if it had ... — Kent Dahl <kentda@...>
Jeff Mitchell wrote:
[#77354] Ruby could be wildly more popular if it had ... — quixoticsycophant@... (Jeff Mitchell)
Brackets.
Saluton!
Chris Thomas <chris@m-audio.com> wrote:
On Fri, Aug 01, 2003 at 07:48:54PM +0900, Martin DeMello wrote:
Saluton!
On Sat, 2 Aug 2003 05:09:39 +0900, Josef 'Jupp' Schugt wrote:
[#77359] Hm... nice, Euclid is a one-liner — Rudolf Polzer <denshimeiru-sapmctacher@...>
a, b = b, a % b while b != 0
[#77368] Ruby => Rite, AST => Bytecode? — Austin Ziegler <austin@...>
Matz and fellow Rubyists,
[#77381] What's with -F in 1.8? — Jason Creighton <androflux@...>
Hello,
Hi,
On Wed 30 Jul 2003 at 15:43:15 +0900, Yukihiro Matsumoto wrote:
[#77408] Bignum multiplication — Harry Ohlsen <harryo@...>
I was just reading about Python 2.3 and they talked about how they've changed their arbitrary-precision integer multiplication to use the Karatsuba multiplication algorithm.
Hi,
Hi,
On Wed, 30 Jul 2003 19:46, Yukihiro Matsumoto wrote:
[#77452] collect_by — Martin DeMello <martindemello@...>
For all you FPers out there - is this a defined function in any
[#77454] MOO — james_b <james_b@...>
I ran across a thread on iwethey.org, where Jim Weirich wondered about
[#77475] Announce: #ruby.dk — "Anders K. Madsen" <madsen@...>
Sorry to bother all you non-danish folks, but...
[#77516] wanted: official mirrors for 1.8.0 — matz@... (Yukihiro Matsumoto)
Hello,
----- Original Message -----
Hello,
On Thursday 31 July 2003 12:50 am, Yukihiro Matsumoto wrote:
> > Others?
[#77528] ruby 1.8.0 preview6 — matz@... (Yukihiro Matsumoto)
Hello,
On Jul 31, Yukihiro Matsumoto wrote:
On Thu July 31 2003 11:42 am, Brett H. Williams wrote:
Hi,
[#77537] What's new in 1.8.0? — David Heinemeier Hansson <david@...>
I've been searching high and low for a prioritized presentation of what
[#77549] Feature request: stable sort — Brian Candler <B.Candler@...>
I've just been poking around and I see that ruby's sort is implemented by
Hi,
On Thu, Jul 31, 2003 at 10:48:49PM +0900, nobu.nokada@softhome.net wrote:
[#77588] RubyMirror on RubyForge — Richard Kilmer <rich@...>
RubyMirror is a RubyForge project which will hold Ruby source
[#77590] Spam at ruby-talk — Daniel Carrera <dcarrera@...>
I don't know who runs the ruby-talk mailing list. I've noticed that
Daniel Carrera wrote:
On Fri, Aug 01, 2003 at 03:37:54AM +0900, Dave Thomas wrote:
I've recently switched from spamassassin to spambayes with much improved results.
Thanks I'll keep that in mind. I'm using spamassassin because that's what
[#77592] Changing ==,>,<, etc — elbows@... (Nathan Weston)
The latest Perl exegesis
[#77623] Extracting a parent class — Michael Garriss <mgarriss@...>
Sorry about the newbie question but....
----- Original Message -----
Answer:
Sorry...I should have been more clear. While this works it does not
portable(?) user/group ID control
Hi,
About 2 years ago, there was a small thread of discussion on
ruby-dev ML. It was about the portablity of user/group ID control.
Process.uid= and Process.euid= are not enough for adequate control
of privileges. Systemcalls (such as setuid or setreuid) have only
low portability because of dependency on OS. The discussion was
about the set of methods and specification of each method which
has higher portability for privileges control than the current
method set of Ruby.
Here is a sample of specification. A patch for CVS head (1.8.0)
is attached to this mail. In a lot of cases, the purpose of
user/group ID control is (1) to exchange a user privilege to
another privilege temporarily, or (2) to drop to a user privilege
permanently. If based on this patch, Process::UserID.eid = new_id
and Process::UserID.swith will work for case (1), and
Process::UserID.to(new_id) will work for case (2). Which systemcalls
must be used for the purpose on the current environment is determined
by Ruby.
Your comments and suggestions (include better names of methods) are
welcome.
# As you know, I can write only a little English.
# So, I'm very sorry but I may not be able to give you answers
# enough to satisfy your question.
=*==*==*==*==*==*==*==*==*==*==*==*==*==*==*==*==*==*==*=
module Process::ID_Syscall
* Simple implementation of systemcalls.
* These methods have low portability.
getuid
geteuid
getgid
getegid
setuid
setgid
setruid
setrgid
seteuid
setegid
setreuid
setregid
setresuid
setresgid
module Process::UserID
* manipulate user IDs of the process
module Process::GroupID
* manipulate group IDs of the process
============================================================
Process::UserID.rid [Process::GroupID.rid]
SPEC : gets the real user ID of the current process.
============================================================
Process::UserID.eid [Process::GroupID.eid]
SPEC : gets the effective user ID of the current process.
============================================================
Process::UserID.to(id) [Process::GroupID.to(id)]
SPEC : sets the real/effective/saved user ID to id.
If succeed, returns id.
If fail to change some of IDs, raise a exception.
After the exception, it is unknown whether each of IDs
keeps the old value.
Attention :
There is no compatibility with Process.uid=.
If you use the method implemented by setreuid(id,-1),
for example, please rewrite the script to the following.
Process::UserID.ex_reid # (r,e,s)==(u1,u2,??) ==> (u2,u1,??)
Process::UserID.eid = id # (u2,u1,??) ==> (u2,id,??)
Process::UserID.ex_reid # (u2,id,??) ==> (id,u2,??)
============================================================
Process::UserID.eid=(id) [Process::GroupID.eid=(id)]
SPEC : sets the effecttive user ID to id.
If succeeed, returns id.
It depends on the value of Process::UserID.ex_reid? whether
the saved user ID is changed or not at the same time.
If Process::UserID.ex_reid? returns false, the saved user ID
is not changed. If Process::UserID.ex_reid? returns true and
succeed to change the effective user ID to the different
value from the real user ID, the saved user ID is changed to
the new effective user ID.
If fail to change, raise a exception.
============================================================
Process::UserID.ex_reid [Process::GroupID.ex_reid]
SPEC : exchanges the real user ID and the effective user ID.
the saved user ID is set to the same value as the new
effective user ID.
If not implemented (depends on specification of systemcalls
of your OS), raise a exception.
If succeed, returns the new effective user ID.
============================================================
Process::UserID.ex_reid? [Process::GroupID.ex_reid?]
SPEC : returns whether can exchange or not the real user ID and the
effective user ID (whether Process::UserID.ex_reid is
implemented or not) on your environment.
If implemented, returns true.
============================================================
Process::UserID.has_sid? [Process::GroupID.has_sid?]
SPEC : returns whether your OS supports the saved user ID or not.
If supports, returns true.
Attention :
On the current version, if one of the following rules is
satisfied, this method gesses the environment supports the
saved user ID.
(1) has setresuid() systemcall.
(2) has seteuid() systemcall.
(3) define _POSIX_SAVED_IDS as true
============================================================
Process::UserID.switch [Process::GroupID.switch]
Process::UserID.switch { ... } [Process::GroupID.switch { ... }]
SPEC : changes the user privilege temporarily.
If a block is given, evaluate the block under the switched
user privilege and back to the original privilege.
Without a block, it works to switch the two privileges.
As far as the real/effective/saved user ID are not changed by
other methods, this method toggles the two privileges.
Without a block, this method returns a user ID which is
restorable. With a block, returns a value of the block.
If the status of current real/effective/saved user ID cannot
support switching privileges, raise a exception.
If with a block and cannot change back to original privilege
after evaluating the block (e.g. calls Process::UserID.to(id)
in the block), raise a exception.
The privilage to be changed to is the current real user ID's
privilege or the current saved ID's privilege. If your
enviromnet doesn't have the saved user ID, the real user ID
is changed by this method.
============================================================
=*==*==*==*==*==*==*==*==*==*==*==*==*==*==*==*==*==*==*=
Index: configure.in
===================================================================
RCS file: /src/ruby/configure.in,v
retrieving revision 1.179
diff -u -r1.179 configure.in
--- configure.in 11 Jul 2003 13:37:22 -0000 1.179
+++ configure.in 16 Jul 2003 03:45:50 -0000
@@ -371,9 +371,9 @@
truncate chsize times utimes fcntl lockf lstat symlink readlink\
setitimer setruid seteuid setreuid setresuid setproctitle\
setrgid setegid setregid setresgid pause lchown lchmod\
- getpgrp setpgrp getpgid setpgid getgroups setgroups getpriority getrlimit\
- dlopen sigprocmask sigaction _setjmp setsid telldir seekdir fchmod\
- mktime timegm cosh sinh tanh)
+ getpgrp setpgrp getpgid setpgid initgroups getgroups setgroups\
+ getpriority getrlimit dlopen sigprocmask sigaction _setjmp\
+ setsid telldir seekdir fchmod mktime timegm cosh sinh tanh)
AC_STRUCT_TIMEZONE
AC_CACHE_CHECK(for struct tm.tm_gmtoff, rb_cv_member_struct_tm_tm_gmtoff,
[AC_TRY_COMPILE([#include <time.h>],
Index: process.c
===================================================================
RCS file: /src/ruby/process.c,v
retrieving revision 1.73
diff -u -r1.73 process.c
--- process.c 15 Jul 2003 07:35:10 -0000 1.73
+++ process.c 16 Jul 2003 03:45:52 -0000
@@ -1158,6 +1158,66 @@
}
static VALUE
+p_sys_setuid(obj, id)
+ VALUE obj, id;
+{
+#if defined HAVE_SETUID
+ if (setuid(NUM2INT(id)) != 0) rb_sys_fail(0);
+#else
+ rb_notimplement();
+#endif
+ return Qnil;
+}
+
+static VALUE
+p_sys_setruid(obj, id)
+ VALUE obj, id;
+{
+#if defined HAVE_SETRUID
+ if (setruid(NUM2INT(id)) != 0) rb_sys_fail(0);
+#else
+ rb_notimplement();
+#endif
+ return Qnil;
+}
+
+static VALUE
+p_sys_seteuid(obj, id)
+ VALUE obj, id;
+{
+#if defined HAVE_SETEUID
+ if (seteuid(NUM2INT(id)) != 0) rb_sys_fail(0);
+#else
+ rb_notimplement();
+#endif
+ return Qnil;
+}
+
+static VALUE
+p_sys_setreuid(obj, rid, eid)
+ VALUE obj, rid, eid;
+{
+#if defined HAVE_SETREUID
+ if (setreuid(NUM2INT(rid),NUM2INT(eid)) != 0) rb_sys_fail(0);
+#else
+ rb_notimplement();
+#endif
+ return Qnil;
+}
+
+static VALUE
+p_sys_setresuid(obj, rid, eid, sid)
+ VALUE obj, rid, eid, sid;
+{
+#if defined HAVE_SETRESUID
+ if (setresuid(NUM2INT(rid),NUM2INT(eid),NUM2INT(sid)) != 0) rb_sys_fail(0);
+#else
+ rb_notimplement();
+#endif
+ return Qnil;
+}
+
+static VALUE
proc_getuid(obj)
VALUE obj;
{
@@ -1177,7 +1237,7 @@
if (setreuid(uid, -1) < 0) rb_sys_fail(0);
#elif defined HAVE_SETRUID
if (setruid(uid) < 0) rb_sys_fail(0);
-#else
+#elif defined HAVE_SETUID
{
if (geteuid() == uid) {
if (setuid(uid) < 0) rb_sys_fail(0);
@@ -1186,10 +1246,203 @@
rb_notimplement();
}
}
+#else
+ rb_notimplement();
#endif
return INT2FIX(uid);
}
+static int SAVED_USER_ID;
+
+static VALUE
+p_uid_set_to(obj, id)
+ VALUE obj, id;
+{
+ extern int errno;
+ int uid;
+
+ uid = NUM2INT(id);
+
+ if (geteuid() == 0) { /* root-user */
+#if defined(HAVE_SETRESUID)
+ if (setresuid(uid, uid, uid) < 0) rb_sys_fail(0);
+ SAVED_USER_ID = uid;
+#elif defined HAVE_SETUID
+ if (setuid(uid) < 0) rb_sys_fail(0);
+ SAVED_USER_ID = uid;
+#elif defined HAVE_SETREUID
+ if (getuid() == uid) {
+ if (SAVED_USER_ID == uid) {
+ if (setreuid(-1, uid) < 0) rb_sys_fail(0);
+ } else {
+ if (uid == 0) { /* (r,e,s) == (root, root, x) */
+ if (setreuid(-1, SAVED_USER_ID) < 0) rb_sys_fail(0);
+ if (setreuid(SAVED_USER_ID, 0) < 0) rb_sys_fail(0);
+ SAVED_USER_ID = 0; /* (r,e,s) == (x, root, root) */
+ if (setreuid(uid, uid) < 0) rb_sys_fail(0);
+ SAVED_USER_ID = uid;
+ } else {
+ if (setreuid(0, -1) < 0) rb_sys_fail(0);
+ SAVED_USER_ID = 0;
+ if (setreuid(uid, uid) < 0) rb_sys_fail(0);
+ SAVED_USER_ID = uid;
+ }
+ }
+ } else {
+ if (setreuid(uid, uid) < 0) rb_sys_fail(0);
+ SAVED_USER_ID = uid;
+ }
+#elif defined HAVE_SETRUID && defined HAVE_SETEUID
+ if (getuid() == uid) {
+ if (SAVED_USER_ID == uid) {
+ if (seteuid(uid) < 0) rb_sys_fail(0);
+ } else {
+ if (uid == 0) {
+ if (setruid(SAVED_USER_ID) < 0) rb_sys_fail(0);
+ SAVED_USER_ID = 0;
+ if (setruid(0) < 0) rb_sys_fail(0);
+ } else {
+ if (setruid(0) < 0) rb_sys_fail(0);
+ SAVED_USER_ID = 0;
+ if (seteuid(uid) < 0) rb_sys_fail(0);
+ if (setruid(uid) < 0) rb_sys_fail(0);
+ SAVED_USER_ID = uid;
+ }
+ }
+ } else {
+ if (seteuid(uid) < 0) rb_sys_fail(0);
+ if (setruid(uid) < 0) rb_sys_fail(0);
+ SAVED_USER_ID = uid;
+ }
+#else
+ rb_notimplement();
+#endif
+ } else { /* unprivileged user */
+#if defined(HAVE_SETRESUID)
+ if (setresuid((getuid() == uid)? -1: uid,
+ (geteuid() == uid)? -1: uid,
+ (SAVED_USER_ID == uid)? -1: uid) < 0) rb_sys_fail(0);
+ SAVED_USER_ID = uid;
+#elif defined HAVE_SETREUID
+ if (SAVED_USER_ID == uid) {
+ if (setreuid((getuid() == uid)? -1: uid,
+ (geteuid() == uid)? -1: uid) < 0) rb_sys_fail(0);
+ } else if (getuid() != uid) {
+ if (setreuid(uid, (geteuid() == uid)? -1: uid) < 0) rb_sys_fail(0);
+ SAVED_USER_ID = uid;
+ } else if (/* getuid() == uid && */ geteuid() != uid) {
+ if (setreuid(geteuid(), uid) < 0) rb_sys_fail(0);
+ SAVED_USER_ID = uid;
+ if (setreuid(uid, -1) < 0) rb_sys_fail(0);
+ } else { /* getuid() == uid && geteuid() == uid */
+ if (setreuid(-1, SAVED_USER_ID) < 0) rb_sys_fail(0);
+ if (setreuid(SAVED_USER_ID, uid) < 0) rb_sys_fail(0);
+ SAVED_USER_ID = uid;
+ if (setreuid(uid, -1) < 0) rb_sys_fail(0);
+ }
+#elif defined HAVE_SETRUID && defined HAVE_SETEUID
+ if (SAVED_USER_ID == uid) {
+ if (geteuid() != uid && seteuid(uid) < 0) rb_sys_fail(0);
+ if (getuid() != uid && setruid(uid) < 0) rb_sys_fail(0);
+ } else if (/* SAVED_USER_ID != uid && */ geteuid() == uid) {
+ if (getuid() != uid) {
+ if (setruid(uid) < 0) rb_sys_fail(0);
+ SAVED_USER_ID = uid;
+ } else {
+ if (setruid(SAVED_USER_ID) < 0) rb_sys_fail(0);
+ SAVED_USER_ID = uid;
+ if (setruid(uid) < 0) rb_sys_fail(0);
+ }
+ } else if (/* geteuid() != uid && */ getuid() == uid) {
+ if (seteuid(uid) < 0) rb_sys_fail(0);
+ if (setruid(SAVED_USER_ID) < 0) rb_sys_fail(0);
+ SAVED_USER_ID = uid;
+ if (setruid(uid) < 0) rb_sys_fail(0);
+ } else {
+ errno = EPERM;
+ rb_sys_fail(0);
+ }
+#elif defined HAVE_SETEUID
+ if (getuid() == uid && SAVED_USER_ID == uid) {
+ if (seteuid(uid) < 0) rb_sys_fail(0);
+ } else {
+ errno = EPERM;
+ rb_sys_fail(0);
+ }
+#elif defined HAVE_SETUID
+ if (getuid() == uid && SAVED_USER_ID == uid) {
+ if (setuid(uid) < 0) rb_sys_fail(0);
+ } else {
+ errno = EPERM;
+ rb_sys_fail(0);
+ }
+#else
+ rb_notimplement();
+#endif
+ }
+ return INT2FIX(uid);
+}
+
+static VALUE
+p_sys_setgid(obj, id)
+ VALUE obj, id;
+{
+#if defined HAVE_SETGID
+ if (setgid(NUM2INT(id)) != 0) rb_sys_fail(0);
+#else
+ rb_notimplement();
+#endif
+ return Qnil;
+}
+
+static VALUE
+p_sys_setrgid(obj, id)
+ VALUE obj, id;
+{
+#if defined HAVE_SETRGID
+ if (setrgid(NUM2INT(id)) != 0) rb_sys_fail(0);
+#else
+ rb_notimplement();
+#endif
+ return Qnil;
+}
+
+static VALUE
+p_sys_setegid(obj, id)
+ VALUE obj, id;
+{
+#if defined HAVE_SETEGID
+ if (setegid(NUM2INT(id)) != 0) rb_sys_fail(0);
+#else
+ rb_notimplement();
+#endif
+ return Qnil;
+}
+
+static VALUE
+p_sys_setregid(obj, rid, eid)
+ VALUE obj, rid, eid;
+{
+#if defined HAVE_SETREGID
+ if (setregid(NUM2INT(rid),NUM2INT(eid)) != 0) rb_sys_fail(0);
+#else
+ rb_notimplement();
+#endif
+ return Qnil;
+}
+
+static VALUE
+p_sys_setresgid(obj, rid, eid, sid)
+ VALUE obj, rid, eid, sid;
+{
+#if defined HAVE_SETRESGID
+ if (setresgid(NUM2INT(rid),NUM2INT(eid),NUM2INT(sid)) != 0) rb_sys_fail(0);
+#else
+ rb_notimplement();
+#endif
+ return Qnil;
+}
+
static VALUE
proc_getgid(obj)
VALUE obj;
@@ -1208,9 +1461,9 @@
if (setresgid(gid, -1, -1) < 0) rb_sys_fail(0);
#elif defined HAVE_SETREGID
if (setregid(gid, -1) < 0) rb_sys_fail(0);
-#elif defined HAS_SETRGID
+#elif defined HAVE_SETRGID
if (setrgid((GIDTYPE)gid) < 0) rb_sys_fail(0);
-#else
+#elif defined HAVE_SETGID
{
if (getegid() == gid) {
if (setgid(gid) < 0) rb_sys_fail(0);
@@ -1219,6 +1472,8 @@
rb_notimplement();
}
}
+#else
+ rb_notimplement();
#endif
return INT2FIX(gid);
}
@@ -1302,6 +1557,21 @@
}
static VALUE
+proc_initgroups(obj, uname, base_grp)
+ VALUE obj, uname, base_grp;
+{
+#ifdef HAVE_INITGROUPS
+ if (initgroups(StringValuePtr(uname), (gid_t)NUM2INT(base_grp)) != 0) {
+ rb_sys_fail(0);
+ }
+ return proc_getgroups(obj);
+#else
+ rb_notimplement();
+ return Qnil;
+#endif
+}
+
+static VALUE
proc_getmaxgroups(obj)
VALUE obj;
{
@@ -1322,6 +1592,138 @@
return INT2FIX(maxgroups);
}
+static int SAVED_GROUP_ID;
+
+static VALUE
+p_gid_set_to(obj, id)
+ VALUE obj, id;
+{
+ extern int errno;
+ int gid;
+
+ gid = NUM2INT(id);
+
+ if (geteuid() == 0) { /* root-user */
+#if defined(HAVE_SETRESGID)
+ if (setresgid(gid, gid, gid) < 0) rb_sys_fail(0);
+ SAVED_GROUP_ID = gid;
+#elif defined HAVE_SETGID
+ if (setgid(gid) < 0) rb_sys_fail(0);
+ SAVED_GROUP_ID = gid;
+#elif defined HAVE_SETREGID
+ if (getgid() == gid) {
+ if (SAVED_GROUP_ID == gid) {
+ if (setregid(-1, gid) < 0) rb_sys_fail(0);
+ } else {
+ if (gid == 0) { /* (r,e,s) == (root, y, x) */
+ if (setregid(-1, SAVED_GROUP_ID) < 0) rb_sys_fail(0);
+ if (setregid(SAVED_GROUP_ID, 0) < 0) rb_sys_fail(0);
+ SAVED_GROUP_ID = 0; /* (r,e,s) == (x, root, root) */
+ if (setregid(gid, gid) < 0) rb_sys_fail(0);
+ SAVED_GROUP_ID = gid;
+ } else { /* (r,e,s) == (z, y, x) */
+ if (setregid(0, 0) < 0) rb_sys_fail(0);
+ SAVED_GROUP_ID = 0;
+ if (setregid(gid, gid) < 0) rb_sys_fail(0);
+ SAVED_GROUP_ID = gid;
+ }
+ }
+ } else {
+ if (setregid(gid, gid) < 0) rb_sys_fail(0);
+ SAVED_GROUP_ID = gid;
+ }
+#elif defined HAVE_SETRGID && defined HAVE_SETEGID
+ if (getgid() == gid) {
+ if (SAVED_GROUP_ID == gid) {
+ if (setegid(gid) < 0) rb_sys_fail(0);
+ } else {
+ if (gid == 0) {
+ if (setegid(gid) < 0) rb_sys_fail(0);
+ if (setrgid(SAVED_GROUP_ID) < 0) rb_sys_fail(0);
+ SAVED_GROUP_ID = 0;
+ if (setrgid(0) < 0) rb_sys_fail(0);
+ } else {
+ if (setrgid(0) < 0) rb_sys_fail(0);
+ SAVED_GROUP_ID = 0;
+ if (setegid(gid) < 0) rb_sys_fail(0);
+ if (setrgid(gid) < 0) rb_sys_fail(0);
+ SAVED_GROUP_ID = gid;
+ }
+ }
+ } else {
+ if (setegid(gid) < 0) rb_sys_fail(0);
+ if (setrgid(gid) < 0) rb_sys_fail(0);
+ SAVED_GROUP_ID = gid;
+ }
+#else
+ rb_notimplement();
+#endif
+ } else { /* unprivileged user */
+#if defined(HAVE_SETRESGID)
+ if (setresgid((getgid() == gid)? -1: gid,
+ (getegid() == gid)? -1: gid,
+ (SAVED_GROUP_ID == gid)? -1: gid) < 0) rb_sys_fail(0);
+ SAVED_GROUP_ID = gid;
+#elif defined HAVE_SETREGID
+ if (SAVED_GROUP_ID == gid) {
+ if (setregid((getgid() == gid)? -1: gid,
+ (getegid() == gid)? -1: gid) < 0) rb_sys_fail(0);
+ } else if (getgid() != gid) {
+ if (setregid(gid, (getegid() == gid)? -1: gid) < 0) rb_sys_fail(0);
+ SAVED_GROUP_ID = gid;
+ } else if (/* getgid() == gid && */ getegid() != gid) {
+ if (setregid(getegid(), gid) < 0) rb_sys_fail(0);
+ SAVED_GROUP_ID = gid;
+ if (setregid(gid, -1) < 0) rb_sys_fail(0);
+ } else { /* getgid() == gid && getegid() == gid */
+ if (setregid(-1, SAVED_GROUP_ID) < 0) rb_sys_fail(0);
+ if (setregid(SAVED_GROUP_ID, gid) < 0) rb_sys_fail(0);
+ SAVED_GROUP_ID = gid;
+ if (setregid(gid, -1) < 0) rb_sys_fail(0);
+ }
+#elif defined HAVE_SETRGID && defined HAVE_SETEGID
+ if (SAVED_GROUP_ID == gid) {
+ if (getegid() != gid && setegid(gid) < 0) rb_sys_fail(0);
+ if (getgid() != gid && setrgid(gid) < 0) rb_sys_fail(0);
+ } else if (/* SAVED_GROUP_ID != gid && */ getegid() == gid) {
+ if (getgid() != gid) {
+ if (setrgid(gid) < 0) rb_sys_fail(0);
+ SAVED_GROUP_ID = gid;
+ } else {
+ if (setrgid(SAVED_GROUP_ID) < 0) rb_sys_fail(0);
+ SAVED_GROUP_ID = gid;
+ if (setrgid(gid) < 0) rb_sys_fail(0);
+ }
+ } else if (/* getegid() != gid && */ getgid() == gid) {
+ if (setegid(gid) < 0) rb_sys_fail(0);
+ if (setrgid(SAVED_GROUP_ID) < 0) rb_sys_fail(0);
+ SAVED_GROUP_ID = gid;
+ if (setrgid(gid) < 0) rb_sys_fail(0);
+ } else {
+ errno = EPERM;
+ rb_sys_fail(0);
+ }
+#elif defined HAVE_SETEGID
+ if (getgid() == gid && SAVED_GROUP_ID == gid) {
+ if (setegid(gid) < 0) rb_sys_fail(0);
+ } else {
+ errno = EPERM;
+ rb_sys_fail(0);
+ }
+#elif defined HAVE_SETGID
+ if (getgid() == gid && SAVED_GROUP_ID == gid) {
+ if (setgid(gid) < 0) rb_sys_fail(0);
+ } else {
+ errno = EPERM;
+ rb_sys_fail(0);
+ }
+#else
+ rb_notimplement();
+#endif
+ }
+ return INT2FIX(gid);
+}
+
static VALUE
proc_geteuid(obj)
VALUE obj;
@@ -1340,7 +1742,7 @@
if (setreuid(-1, NUM2INT(euid)) < 0) rb_sys_fail(0);
#elif defined HAVE_SETEUID
if (seteuid(NUM2INT(euid)) < 0) rb_sys_fail(0);
-#else
+#elif defined HAVE_SETUID
euid = NUM2INT(euid);
if (euid == getuid()) {
if (setuid(euid) < 0) rb_sys_fail(0);
@@ -1348,11 +1750,53 @@
else {
rb_notimplement();
}
+#else
+ rb_notimplement();
#endif
return euid;
}
static VALUE
+rb_seteuid_core(euid)
+ int euid;
+{
+ int uid;
+
+ uid = getuid();
+
+#if defined(HAVE_SETRESUID) && !defined(__CHECKER__)
+ if (uid != euid) {
+ if (setresuid(-1,euid,euid) < 0) rb_sys_fail(0);
+ SAVED_USER_ID = euid;
+ } else {
+ if (setresuid(-1,euid,-1) < 0) rb_sys_fail(0);
+ }
+#elif defined HAVE_SETREUID && !defined(__OpenBSD__)
+ if (setreuid(-1, euid) < 0) rb_sys_fail(0);
+ if (uid != euid) {
+ if (setreuid(euid,uid) < 0) rb_sys_fail(0);
+ if (setreuid(uid,euid) < 0) rb_sys_fail(0);
+ SAVED_USER_ID = euid;
+ }
+#elif defined HAVE_SETEUID
+ if (seteuid(euid) < 0) rb_sys_fail(0);
+#elif defined HAVE_SETUID
+ if (geteuid() == 0) rb_sys_fail(0);
+ if (setuid(euid) < 0) rb_sys_fail(0);
+#else
+ rb_notimplement();
+#endif
+ return INT2FIX(euid);
+}
+
+static VALUE
+p_uid_set_eid(obj, id)
+ VALUE obj, id;
+{
+ return rb_seteuid_core(NUM2INT(id));
+}
+
+static VALUE
proc_getegid(obj)
VALUE obj;
{
@@ -1372,7 +1816,7 @@
if (setregid(-1, NUM2INT(egid)) < 0) rb_sys_fail(0);
#elif defined HAVE_SETEGID
if (setegid(NUM2INT(egid)) < 0) rb_sys_fail(0);
-#else
+#elif defined HAVE_SETGID
egid = NUM2INT(egid);
if (egid == getgid()) {
if (setgid(egid) < 0) rb_sys_fail(0);
@@ -1380,10 +1824,224 @@
else {
rb_notimplement();
}
+#else
+ rb_notimplement();
#endif
return egid;
}
+static VALUE
+rb_setegid_core(egid)
+ int egid;
+{
+ int gid;
+
+ gid = getgid();
+
+#if defined(HAVE_SETRESGID) && !defined(__CHECKER__)
+ if (gid != egid) {
+ if (setresgid(-1,egid,egid) < 0) rb_sys_fail(0);
+ SAVED_GROUP_ID = egid;
+ } else {
+ if (setresgid(-1,egid,-1) < 0) rb_sys_fail(0);
+ }
+#elif defined HAVE_SETREGID && !defined(__OpenBSD__)
+ if (setregid(-1, egid) < 0) rb_sys_fail(0);
+ if (gid != egid) {
+ if (setregid(egid,gid) < 0) rb_sys_fail(0);
+ if (setregid(gid,egid) < 0) rb_sys_fail(0);
+ SAVED_GROUP_ID = egid;
+ }
+#elif defined HAVE_SETEGID
+ if (setegid(egid) < 0) rb_sys_fail(0);
+#elif defined HAVE_SETGID
+ if (getegid() == 0) rb_sys_fail(0);
+ if (setgid(egid) < 0) rb_sys_fail(0);
+#else
+ rb_notimplement();
+#endif
+ return INT2FIX(egid);
+}
+
+static VALUE
+p_gid_set_eid(obj, id)
+ VALUE obj, id;
+{
+ return rb_setegid_core(NUM2INT(id));
+}
+
+static VALUE
+p_uid_exchangeable()
+{
+#if defined(HAVE_SETRESUID) && !defined(__CHECKER__)
+ return Qtrue;
+#elif defined HAVE_SETREUID && !defined(__OpenBSD__)
+ return Qtrue;
+#else
+ return Qfalse;
+#endif
+}
+
+static VALUE
+p_uid_exchange(obj)
+ VALUE obj;
+{
+ int uid, euid;
+
+ uid = getuid();
+ euid = geteuid();
+
+#if defined(HAVE_SETRESUID) && !defined(__CHECKER__)
+ if (setresuid(euid, uid, uid) < 0) rb_sys_fail(0);
+ SAVED_USER_ID = uid;
+#elif defined HAVE_SETREUID && !defined(__OpenBSD__)
+ if (setreuid(euid,uid) < 0) rb_sys_fail(0);
+ SAVED_USER_ID = uid;
+#else
+ rb_notimplement();
+#endif
+ return INT2FIX(uid);
+}
+
+static VALUE
+p_gid_exchangeable()
+{
+#if defined(HAVE_SETRESGID) && !defined(__CHECKER__)
+ return Qtrue;
+#elif defined HAVE_SETREGID && !defined(__OpenBSD__)
+ return Qtrue;
+#else
+ return Qfalse;
+#endif
+}
+
+static VALUE
+p_gid_exchange(obj)
+ VALUE obj;
+{
+ int gid, egid;
+
+ gid = getgid();
+ egid = getegid();
+
+#if defined(HAVE_SETRESGID) && !defined(__CHECKER__)
+ if (setresgid(egid, gid, gid) < 0) rb_sys_fail(0);
+ SAVED_GROUP_ID = gid;
+#elif defined HAVE_SETREGID && !defined(__OpenBSD__)
+ if (setregid(egid,gid) < 0) rb_sys_fail(0);
+ SAVED_GROUP_ID = gid;
+#else
+ rb_notimplement();
+#endif
+ return INT2FIX(gid);
+}
+
+static VALUE
+p_uid_has_saved_id()
+{
+#if defined(HAVE_SETRESUID) || defined(HAVE_SETEUID) || _POSIX_SAVED_IDS
+ return Qtrue;
+#else
+ return Qfalse;
+#endif
+}
+
+static VALUE
+p_uid_switch_auth(obj)
+ VALUE obj;
+{
+ extern int errno;
+ int uid, euid;
+
+ uid = getuid();
+ euid = geteuid();
+
+#if defined(HAVE_SETRESUID) || defined(HAVE_SETEUID) || _POSIX_SAVED_IDS
+ if (uid != euid) {
+ proc_seteuid(obj, INT2FIX(uid));
+ if (rb_block_given_p()) {
+ return rb_ensure(rb_yield, Qnil, rb_seteuid_core, SAVED_USER_ID);
+ } else {
+ return INT2FIX(euid);
+ }
+ } else if (euid != SAVED_USER_ID) {
+ proc_seteuid(obj, INT2FIX(SAVED_USER_ID));
+ if (rb_block_given_p()) {
+ return rb_ensure(rb_yield, Qnil, rb_seteuid_core, euid);
+ } else {
+ return INT2FIX(uid);
+ }
+ } else {
+ errno = EPERM;
+ rb_sys_fail(0);
+ }
+#else
+ if (uid == euid) {
+ errno = EPERM;
+ rb_sys_fail(0);
+ }
+ proc_swap_uid(obj);
+ if (rb_block_given_p()) {
+ return rb_ensure(rb_yield, Qnil, proc_swap_uid, obj);
+ } else {
+ return INT2FIX(euid);
+ }
+#endif
+}
+
+static VALUE
+p_gid_has_saved_id()
+{
+#if defined(HAVE_SETRESGID) || defined(HAVE_SETEGID) || _POSIX_SAVED_IDS
+ return Qtrue;
+#else
+ return Qfalse;
+#endif
+}
+
+static VALUE
+p_gid_switch_auth(obj)
+ VALUE obj;
+{
+ extern int errno;
+ int gid, egid;
+
+ gid = getgid();
+ egid = getegid();
+
+#if defined(HAVE_SETRESGID) || defined(HAVE_SETEGID) || _POSIX_SAVED_IDS
+ if (gid != egid) {
+ proc_setegid(obj, INT2FIX(gid));
+ if (rb_block_given_p()) {
+ return rb_ensure(rb_yield, Qnil, proc_setegid, INT2FIX(SAVED_GROUP_ID));
+ } else {
+ return INT2FIX(egid);
+ }
+ } else if (egid != SAVED_GROUP_ID) {
+ proc_setegid(obj, INT2FIX(SAVED_GROUP_ID));
+ if (rb_block_given_p()) {
+ return rb_ensure(rb_yield, Qnil, proc_setegid, INT2FIX(egid));
+ } else {
+ return INT2FIX(gid);
+ }
+ } else {
+ errno = EPERM;
+ rb_sys_fail(0);
+ }
+#else
+ if (gid == egid) {
+ errno = EPERM;
+ rb_sys_fail(0);
+ }
+ proc_swap_gid(obj);
+ if (rb_block_given_p()) {
+ return rb_ensure(rb_yield, Qnil, proc_swap_gid, obj);
+ } else {
+ return INT2FIX(egid);
+ }
+#endif
+}
+
VALUE
rb_proc_times(obj)
VALUE obj;
@@ -1411,6 +2069,9 @@
}
VALUE rb_mProcess;
+VALUE rb_mProcUID;
+VALUE rb_mProcGID;
+VALUE rb_mProcID_Syscall;
void
Init_process()
@@ -1499,6 +2160,7 @@
rb_define_module_function(rb_mProcess, "euid=", proc_seteuid, 1);
rb_define_module_function(rb_mProcess, "egid", proc_getegid, 0);
rb_define_module_function(rb_mProcess, "egid=", proc_setegid, 1);
+ rb_define_module_function(rb_mProcess, "initgroups", proc_initgroups, 2);
rb_define_module_function(rb_mProcess, "groups", proc_getgroups, 0);
rb_define_module_function(rb_mProcess, "groups=", proc_setgroups, 1);
rb_define_module_function(rb_mProcess, "maxgroups", proc_getmaxgroups, 0);
@@ -1509,4 +2171,53 @@
#if defined(HAVE_TIMES) || defined(_WIN32)
S_Tms = rb_struct_define("Tms", "utime", "stime", "cutime", "cstime", 0);
#endif
+
+ SAVED_USER_ID = geteuid();
+ SAVED_GROUP_ID = getegid();
+
+ rb_mProcUID = rb_define_module_under(rb_mProcess, "UserID");
+ rb_mProcGID = rb_define_module_under(rb_mProcess, "GroupID");
+
+ rb_define_module_function(rb_mProcUID, "rid", proc_getuid, 0);
+ rb_define_module_function(rb_mProcGID, "rid", proc_getgid, 0);
+ rb_define_module_function(rb_mProcUID, "eid", proc_geteuid, 0);
+ rb_define_module_function(rb_mProcGID, "eid", proc_getegid, 0);
+ rb_define_module_function(rb_mProcUID, "to", p_uid_set_to, 1);
+ rb_define_module_function(rb_mProcGID, "to", p_gid_set_to, 1);
+ rb_define_module_function(rb_mProcUID, "eid=", p_uid_set_eid, 1);
+ rb_define_module_function(rb_mProcGID, "eid=", p_gid_set_eid, 1);
+ rb_define_module_function(rb_mProcUID, "ex_reid", p_uid_exchange, 0);
+ rb_define_module_function(rb_mProcGID, "ex_reid", p_gid_exchange, 0);
+ rb_define_module_function(rb_mProcUID, "ex_reid?", p_uid_exchangeable, 0);
+ rb_define_module_function(rb_mProcGID, "ex_reid?", p_gid_exchangeable, 0);
+ rb_define_module_function(rb_mProcUID, "has_sid?", p_uid_has_saved_id, 0);
+ rb_define_module_function(rb_mProcGID, "has_sid?", p_gid_has_saved_id, 0);
+ rb_define_module_function(rb_mProcUID, "switch", p_uid_switch_auth, 0);
+ rb_define_module_function(rb_mProcGID, "switch", p_uid_switch_auth, 0);
+
+ rb_mProcID_Syscall = rb_define_module_under(rb_mProcess, "ID_Syscall");
+
+ rb_define_module_function(rb_mProcID_Syscall, "getuid", proc_getuid, 0);
+ rb_define_module_function(rb_mProcID_Syscall, "geteuid", proc_geteuid, 0);
+ rb_define_module_function(rb_mProcID_Syscall, "getgid", proc_getgid, 0);
+ rb_define_module_function(rb_mProcID_Syscall, "getegid", proc_getegid, 0);
+
+ rb_define_module_function(rb_mProcID_Syscall, "setuid", p_sys_setuid, 1);
+ rb_define_module_function(rb_mProcID_Syscall, "setgid", p_sys_setgid, 1);
+
+ rb_define_module_function(rb_mProcID_Syscall, "setruid", p_sys_setruid, 1);
+ rb_define_module_function(rb_mProcID_Syscall, "setrgid", p_sys_setrgid, 1);
+
+ rb_define_module_function(rb_mProcID_Syscall, "seteuid", p_sys_seteuid, 1);
+ rb_define_module_function(rb_mProcID_Syscall, "setegid", p_sys_setegid, 1);
+
+ rb_define_module_function(rb_mProcID_Syscall, "setreuid",
+ p_sys_setreuid, 2);
+ rb_define_module_function(rb_mProcID_Syscall, "setregid",
+ p_sys_setregid, 2);
+
+ rb_define_module_function(rb_mProcID_Syscall, "setresuid",
+ p_sys_setresuid, 3);
+ rb_define_module_function(rb_mProcID_Syscall, "setresgid",
+ p_sys_setresgid, 3);
}
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)