diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-02-19 07:47:07 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-02-19 07:47:07 +0000 |
commit | 9eae31d5696cb796821929ff289869e94d87c840 (patch) | |
tree | fed3a1b8c969954c23bbe53f740958107edcb171 /file.c | |
parent | 87dfb89d2e15b031432ae09225340331a8259a1c (diff) |
* file.c (path_check_1): do not warn on world writable *parent*
directories.
* class.c (rb_include_module): should preserve ancestor order in
the included class/module.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -2307,13 +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 - && !(st.st_mode & S_ISVTX) + if (!p || !(st.st_mode & S_ISVTX)) #endif - ) { + rb_warn("Unsecure world writeable dir %s , mode 0%o", p0, st.st_mode); if (p) *p = '/'; - rb_warn("Unsecure world writeable dir %s , mode 0%o", p0, st.st_mode); return 0; } s = strrdirsep(p0); |