From: Brent Roman Date: 2009-01-28T15:49:09+09:00 Subject: [ruby-core:21629] Re: UID Too Big, A Bug? It's not just OSx that does this. I've seen it with Linux 2.6 as well. These kernels allow *signed* 32-bit UIDs and GIDs. This looks like a bug in Ruby to me. - brent Daniel Berger-2 wrote: > > James Gray wrote: >> Is this a bug in Ruby? >> >> $ sudo ruby -r etc -e 'nobody = Etc.getpwnam("nobody"); p nobody; >> Process.uid = nobody.uid' >> #> gid=4294967294, gecos="Unprivileged User", dir="/var/empty", >> shell="/usr/bin/false", change=0, uclass="", expire=0> >> -e:1:in `uid=': bignum too big to convert into `long' (RangeError) >> from -e:1 > > For whatever reason, the actual uid value for "nobody" on OS X is -2. > Using a negative value for a uid strikes me as particularly odd, but > there you go. > > I'll now take this moment to brag that sys-admin gets it right. :) > > Regards, > > Dan > > > -- View this message in context: http://www.nabble.com/-ruby-core%3A21618--UID-Too-Big%2C-A-Bug--tp21696231p21700802.html Sent from the ruby-core mailing list archive at Nabble.com.