diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-02-19 08:13:26 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-02-19 08:13:26 +0000 |
| commit | 67836cc8d358cedae0b6706032b4e3434466d246 (patch) | |
| tree | 5a6bbad8df2b79c8e33efb2e1508589cb80e05ac /file.c | |
| parent | 7e8e68061481bf4a641f4c5b2df435e902eeda58 (diff) | |
| download | ruby-67836cc8d358cedae0b6706032b4e3434466d246.tar.gz ruby-67836cc8d358cedae0b6706032b4e3434466d246.tar.xz ruby-67836cc8d358cedae0b6706032b4e3434466d246.zip | |
* file.c (path_check_1): do not fail on world writable *parent*
directories too.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
| -rw-r--r-- | file.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -2307,11 +2307,12 @@ path_check_1(path) #ifndef S_IWOTH # define S_IWOTH 002 #endif - if (stat(p0, &st) == 0 && S_ISDIR(st.st_mode) && (st.st_mode & S_IWOTH)) { + if (stat(p0, &st) == 0 && S_ISDIR(st.st_mode) && (st.st_mode & S_IWOTH) #ifdef S_ISVTX - if (!p || !(st.st_mode & S_ISVTX)) + && (!p || !(st.st_mode & S_ISVTX)) #endif - rb_warn("Unsecure world writeable dir %s , mode 0%o", p0, st.st_mode); + ) { + rb_warn("Unsecure world writeable dir %s , mode 0%o", p0, st.st_mode); if (p) *p = '/'; return 0; } |
