ruby-changes:22931
From: akr <ko1@a...>
Date: Mon, 12 Mar 2012 07:37:26 +0900 (JST)
Subject: [ruby-changes:22931] akr:r34980 (trunk): * lib/tmpdir.rb: update document for changing
akr 2012-03-12 07:37:04 +0900 (Mon, 12 Mar 2012) New Revision: 34980 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34980 Log: * lib/tmpdir.rb: update document for changing FileUtils.remove_entry_secure to FileUtils.remove_entry. * NEWS: add incompatiblity note for lib/tmpdir.rb. Modified files: trunk/ChangeLog trunk/NEWS trunk/lib/tmpdir.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 34979) +++ ChangeLog (revision 34980) @@ -1,3 +1,10 @@ +Mon Mar 12 07:33:12 2012 Tanaka Akira <akr@f...> + + * lib/tmpdir.rb: update document for changing + FileUtils.remove_entry_secure to FileUtils.remove_entry. + + * NEWS: add incompatiblity note for lib/tmpdir.rb. + Mon Mar 12 07:19:03 2012 Nobuyoshi Nakada <nobu@r...> * lib/tmpdir.rb (Dir.tmpdir): should not use world-writable but Index: lib/tmpdir.rb =================================================================== --- lib/tmpdir.rb (revision 34979) +++ lib/tmpdir.rb (revision 34980) @@ -36,6 +36,7 @@ # Dir.mktmpdir creates a temporary directory. # # The directory is created with 0700 permission. + # Application should not change the permission to make the temporary directory accesible from other users. # # The prefix and suffix of the name of the directory is specified by # the optional first argument, <i>prefix_suffix</i>. @@ -56,7 +57,7 @@ # If a block is given, # it is yielded with the path of the directory. # The directory and its contents are removed - # using FileUtils.remove_entry_secure before Dir.mktmpdir returns. + # using FileUtils.remove_entry before Dir.mktmpdir returns. # The value of the block is returned. # # Dir.mktmpdir {|dir| @@ -74,7 +75,7 @@ # open("#{dir}/foo", "w") { ... } # ensure # # remove the directory. - # FileUtils.remove_entry_secure dir + # FileUtils.remove_entry dir # end # def Dir.mktmpdir(prefix_suffix=nil, *rest) Index: NEWS =================================================================== --- NEWS (revision 34979) +++ NEWS (revision 34980) @@ -73,6 +73,13 @@ * Shellwords#shelljoin() accepts non-string objects in the given array, each of which is stringified using to_s. +* lib/tmpdir.rb + * incompatible changes: + * Dir.mktmpdir uses FileUtils.remove_entry instead of + FileUtils.remove_entry_secure. This means that applications should not + change the permission of the created temporary directory to make + accessible from other users. + * zlib * Added support for the new deflate strategies Zlib::RLE and Zlib::FIXED. @@ -93,3 +100,7 @@ * Kernel#respond_to? against a protected method now returns false unless the second argument is true. + + * Dir.mktmpdir in lib/tmpdir.rb + + See above. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/