[#8484] strptime fails to properly parse certain inputs — <noreply@...>

Bugs item #5263, was opened at 2006-08-01 23:14

13 messages 2006/08/02
[#8485] Re: [ ruby-Bugs-5263 ] strptime fails to properly parse certain inputs — Yukihiro Matsumoto <matz@...> 2006/08/02

Hi,

[#8538] Re: [ ruby-Bugs-5263 ] strptime fails to properly parse certain inputs — nobu@... 2006/08/06

Hi,

[#8561] sandbox timers & block scopes — why the lucky stiff <ruby-core@...>

Two puzzles I am trying to solve:

28 messages 2006/08/08
[#8624] Re: sandbox timers & block scopes — why the lucky stiff <ruby-core@...> 2006/08/15

raise ThisDecayingInquisition, "anyone? anyone at all?"

[#8627] Re: sandbox timers & block scopes — MenTaLguY <mental@...> 2006/08/15

On Wed, 2006-08-16 at 00:35 +0900, why the lucky stiff wrote:

[#8628] Re: sandbox timers & block scopes — why the lucky stiff <ruby-core@...> 2006/08/15

On Wed, Aug 16, 2006 at 02:46:30AM +0900, MenTaLguY wrote:

[#8629] Re: sandbox timers & block scopes — "Charles O Nutter" <headius@...> 2006/08/15

On 8/15/06, why the lucky stiff <ruby-core@whytheluckystiff.net> wrote:

[#8690] a ruby-core primer — why the lucky stiff <ruby-core@...>

Hello, all. I've been working on the ruby-core page for the new Ruby site.

21 messages 2006/08/22

Re: [ ruby-Bugs-5351 ] Process.gid= fails on OS X

From: nobu@...
Date: 2006-08-09 01:23:39 UTC
List: ruby-core #8564
Hi,

At Wed, 9 Aug 2006 00:36:10 +0900,
Kazuhiro NISHIYAMA wrote in [ruby-core:08560]:

> > It's that simple. Assign to Process.gid= as root and Ruby
> > will send you an EPERM. setgid() from libc does not have this
> > issue.

> |    if (setregid(gid, -1) < 0) rb_sys_fail(0);
> is used in Mac OS X, and setregid(nonzero, -1) failed.

SUSv2 specifies as:

    The setregid() function is used to set the real and
    effective group IDs of the calling process.
    If rgid is -1, the real group ID is not changed; if egid is
    -1, the effective group ID is not changed. The real and
    effective group IDs may be set to different values in the
    same call.

http://opengroup.org/onlinepubs/007908799/xsh/setregid.html

Also, 
http://developer.apple.com/documentation/Darwin/Reference/ManPages/man2/setregid.2.html
says:

     Supplying a value of -1 for either the real or effective group ID forces
     the system to substitute the current ID in place of the -1 parameter.

Seems a bug of Mac OS X.


Index: process.c
===================================================================
RCS file: /cvs/ruby/src/ruby/process.c,v
retrieving revision 1.92.2.33
diff -p -U 2 -r1.92.2.33 process.c
--- process.c	25 Jul 2006 04:58:15 -0000	1.92.2.33
+++ process.c	9 Aug 2006 01:22:24 -0000
@@ -2123,5 +2123,5 @@ proc_setuid(obj, id)
 #if defined(HAVE_SETRESUID) &&  !defined(__CHECKER__)
     if (setresuid(uid, -1, -1) < 0) rb_sys_fail(0);
-#elif defined HAVE_SETREUID
+#elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID)
     if (setreuid(uid, -1) < 0) rb_sys_fail(0);
 #elif defined HAVE_SETRUID
@@ -2495,5 +2495,5 @@ proc_setgid(obj, id)
 #if defined(HAVE_SETRESGID) && !defined(__CHECKER__)
     if (setresgid(gid, -1, -1) < 0) rb_sys_fail(0);
-#elif defined HAVE_SETREGID
+#elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID)
     if (setregid(gid, -1) < 0) rb_sys_fail(0);
 #elif defined HAVE_SETRGID
@@ -2895,5 +2895,5 @@ proc_seteuid(obj, euid)
 #if defined(HAVE_SETRESUID) && !defined(__CHECKER__)
     if (setresuid(-1, NUM2INT(euid), -1) < 0) rb_sys_fail(0);
-#elif defined HAVE_SETREUID
+#elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID)
     if (setreuid(-1, NUM2INT(euid)) < 0) rb_sys_fail(0);
 #elif defined HAVE_SETEUID
@@ -3009,5 +3009,5 @@ proc_setegid(obj, egid)
 #if defined(HAVE_SETRESGID) && !defined(__CHECKER__)
     if (setresgid(-1, NUM2INT(egid), -1) < 0) rb_sys_fail(0);
-#elif defined HAVE_SETREGID
+#elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID)
     if (setregid(-1, NUM2INT(egid)) < 0) rb_sys_fail(0);
 #elif defined HAVE_SETEGID


-- 
Nobu Nakada

In This Thread