aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-11 22:37:04 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-11 22:37:04 +0000
commit48b5b163fcb6dbf20402ae319114583d00a77805 (patch)
treed930406e778dacb3eac3a5b6efbbb08fc72454d5
parentbcb9e567c422f535b4871ce2795179af808d0077 (diff)
downloadruby-48b5b163fcb6dbf20402ae319114583d00a77805.tar.gz
* lib/tmpdir.rb: update document for changing
FileUtils.remove_entry_secure to FileUtils.remove_entry. * NEWS: add incompatiblity note for lib/tmpdir.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--NEWS11
-rw-r--r--lib/tmpdir.rb5
3 files changed, 21 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 94b4c712d9..f24066cf93 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Mon Mar 12 07:33:12 2012 Tanaka Akira <akr@fsij.org>
+
+ * 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@ruby-lang.org>
* lib/tmpdir.rb (Dir.tmpdir): should not use world-writable but
diff --git a/NEWS b/NEWS
index 03b8000014..7f7457a587 100644
--- a/NEWS
+++ b/NEWS
@@ -73,6 +73,13 @@ with all sufficient information, see the ChangeLog file.
* 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 @@ with all sufficient information, see the ChangeLog file.
* Kernel#respond_to? against a protected method now returns false
unless the second argument is true.
+
+ * Dir.mktmpdir in lib/tmpdir.rb
+
+ See above.
diff --git a/lib/tmpdir.rb b/lib/tmpdir.rb
index 0791c38746..37af025065 100644
--- a/lib/tmpdir.rb
+++ b/lib/tmpdir.rb
@@ -36,6 +36,7 @@ class Dir
# 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 @@ class Dir
# 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 @@ class Dir
# 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)