ruby-changes:54971
From: naruse <ko1@a...>
Date: Wed, 6 Mar 2019 16:14:19 +0900 (JST)
Subject: [ruby-changes:54971] naruse:r67177 (ruby_2_6): merge revision(s) 66972: [Backport #15577]
naruse 2019-03-06 16:14:13 +0900 (Wed, 06 Mar 2019) New Revision: 67177 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67177 Log: merge revision(s) 66972: [Backport #15577] Fix exception namespace * lib/fileutils.rb (remove_entry_secure): EISDIR is under the Errno namespace. [ruby-core:91362] [Bug #15577] From: Tietew (Toru Iwase) <tietew@t...> Modified directories: branches/ruby_2_6/ Modified files: branches/ruby_2_6/lib/fileutils.rb branches/ruby_2_6/test/fileutils/test_fileutils.rb branches/ruby_2_6/version.h Index: ruby_2_6/test/fileutils/test_fileutils.rb =================================================================== --- ruby_2_6/test/fileutils/test_fileutils.rb (revision 67176) +++ ruby_2_6/test/fileutils/test_fileutils.rb (revision 67177) @@ -740,7 +740,15 @@ class TestFileUtils < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/ruby_2_6/test/fileutils/test_fileutils.rb#L740 remove_entry_secure 'tmp/tmpdir/c', true assert_file_not_exist 'tmp/tmpdir/a' assert_file_not_exist 'tmp/tmpdir/c' + + File.chmod(01777, 'tmp/tmpdir') + Dir.mkdir 'tmp/tmpdir/d', 0 + assert_raise(Errno::EACCES) {remove_entry_secure 'tmp/tmpdir/d'} + File.chmod 0777, 'tmp/tmpdir/d' + Dir.rmdir 'tmp/tmpdir/d' + Dir.rmdir 'tmp/tmpdir' + end def test_remove_entry_secure_symlink Index: ruby_2_6/version.h =================================================================== --- ruby_2_6/version.h (revision 67176) +++ ruby_2_6/version.h (revision 67177) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_6/version.h#L1 #define RUBY_VERSION "2.6.1" #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 34 +#define RUBY_PATCHLEVEL 35 #define RUBY_RELEASE_YEAR 2019 #define RUBY_RELEASE_MONTH 3 Index: ruby_2_6/lib/fileutils.rb =================================================================== --- ruby_2_6/lib/fileutils.rb (revision 67176) +++ ruby_2_6/lib/fileutils.rb (revision 67177) @@ -695,7 +695,7 @@ module FileUtils https://github.com/ruby/ruby/blob/trunk/ruby_2_6/lib/fileutils.rb#L695 f.chown euid, -1 f.chmod 0700 } - rescue EISDIR # JRuby in non-native mode can't open files as dirs + rescue Errno::EISDIR # JRuby in non-native mode can't open files as dirs File.lstat(dot_file).tap {|fstat| unless fu_stat_identical_entry?(st, fstat) # symlink (TOC-to-TOU attack?) Index: ruby_2_6 =================================================================== --- ruby_2_6 (revision 67176) +++ ruby_2_6 (revision 67177) Property changes on: ruby_2_6 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /trunk:r66972 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/