[#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-5415 ] invalid test in "sudo make install-doc"?

From: nobu@...
Date: 2006-08-16 02:44:01 UTC
List: ruby-core #8635
Hi,

At Tue, 15 Aug 2006 18:00:24 +0900,
Ryan Davis wrote in [ruby-core:08622]:
> I just found it...

Thank you.

> I can patch the rdoc options processing code to make it work  
> regardless, but I'd like some eyeballs on the difference between the  
> two. Is this a documentation problem or an implementation problem?

I think it is a bug.


* file.c (rb_stat_[rRwWxX]): check for super user.


Index: file.c
===================================================================
RCS file: /cvs/ruby/src/ruby/file.c,v
retrieving revision 1.169.2.47
diff -p -U 2 -r1.169.2.47 file.c
--- file.c	20 Jul 2006 07:04:17 -0000	1.169.2.47
+++ file.c	16 Aug 2006 02:40:20 -0000
@@ -850,4 +850,8 @@ group_member(gid)
 #endif
 
+#if defined(S_IXGRP) && !defined(_WIN32) && !defined(__CYGWIN__)
+#define USE_GETEUID 1
+#endif
+
 #ifndef HAVE_EACCESS
 int
@@ -856,5 +860,5 @@ eaccess(path, mode)
      int mode;
 {
-#if defined(S_IXGRP) && !defined(_WIN32) && !defined(__CYGWIN__)
+#ifdef USE_GETEUID
     struct stat st;
     int euid;
@@ -3745,4 +3749,7 @@ rb_stat_r(obj)
     struct stat *st = get_stat(obj);
 
+#ifdef USE_GETEUID
+    if (geteuid() == 0) return Qtrue;
+#endif
 #ifdef S_IRUSR
     if (rb_stat_owned(obj))
@@ -3778,4 +3785,7 @@ rb_stat_R(obj)
     struct stat *st = get_stat(obj);
 
+#ifdef USE_GETEUID
+    if (getuid() == 0) return Qtrue;
+#endif
 #ifdef S_IRUSR
     if (rb_stat_rowned(obj))
@@ -3809,4 +3819,7 @@ rb_stat_w(obj)
     struct stat *st = get_stat(obj);
 
+#ifdef USE_GETEUID
+    if (geteuid() == 0) return Qtrue;
+#endif
 #ifdef S_IWUSR
     if (rb_stat_owned(obj))
@@ -3840,4 +3853,7 @@ rb_stat_W(obj)
     struct stat *st = get_stat(obj);
 
+#ifdef USE_GETEUID
+    if (getuid() == 0) return Qtrue;
+#endif
 #ifdef S_IWUSR
     if (rb_stat_rowned(obj))
@@ -3873,4 +3889,9 @@ rb_stat_x(obj)
     struct stat *st = get_stat(obj);
 
+#ifdef USE_GETEUID
+    if (geteuid() == 0) {
+	return st->st_mode & S_IXUGO ? Qtrue : Qfalse;
+    }
+#endif
 #ifdef S_IXUSR
     if (rb_stat_owned(obj))
@@ -3902,4 +3923,9 @@ rb_stat_X(obj)
     struct stat *st = get_stat(obj);
 
+#ifdef USE_GETEUID
+    if (getuid() == 0) {
+	return st->st_mode & S_IXUGO ? Qtrue : Qfalse;
+    }
+#endif
 #ifdef S_IXUSR
     if (rb_stat_rowned(obj))


-- 
Nobu Nakada

In This Thread