From: Nobuyoshi Nakada Date: 2006-09-07T14:14:38+09:00 Subject: Re: Insecure word writable dir? Hi, At Thu, 7 Sep 2006 08:08:29 +0900, Yukihiro Matsumoto wrote in [ruby-talk:213041]: > We've changed the condition. World writable parent directories would > not cause warnings if they have sticky bits set. I am not sure if it > works on Windows as well. The check is disabled on Windows. I guess it should be disabled on Cygwin too. Index: file.c =================================================================== RCS file: /home/K8052/cvs/ruby/file.c,v retrieving revision 1.248 diff -U 2 -p -u -r1.248 file.c --- file.c 4 Sep 2006 20:49:52 -0000 1.248 +++ file.c 5 Sep 2006 08:43:05 -0000 @@ -4045,5 +4045,13 @@ is_absolute_path(const char *path) } -#ifndef DOSISH +#ifndef ENABLE_PATH_CHECK +# if defined DOSISH || defined __CYGWIN__ +# define ENABLE_PATH_CHECK 0 +# else +# define ENABLE_PATH_CHECK 1 +# endif +#endif + +#if ENABLE_PATH_CHECK static int path_check_0(VALUE path, int execpath) @@ -4090,5 +4098,5 @@ static int fpath_check(const char *path) { -#ifndef DOSISH +#if ENABLE_PATH_CHECK return path_check_0(rb_str_new2(path), Qfalse); #else @@ -4100,5 +4108,5 @@ int rb_path_check(const char *path) { -#ifndef DOSISH +#if ENABLE_PATH_CHECK const char *p0, *p, *pend; const char sep = PATH_SEP_CHAR; -- Nobu Nakada