diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-07-05 17:19:28 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-07-05 17:19:28 +0000 |
commit | 7f326a3988c74073619689f51481093885f5c203 (patch) | |
tree | c038d7a3306fbabe2e3cac85f9f0f1d6c9398154 | |
parent | d59652ef251ce544d9a59e2b651fe1945a94fee5 (diff) | |
download | ruby-7f326a3988c74073619689f51481093885f5c203.tar.gz |
* lib/tempfile.rb: a tempfile must be created with mode 0600.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/tempfile.rb | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Fri Jul 6 02:15:06 2001 Akinori MUSHA <knu@iDaemons.org> + + * lib/tempfile.rb: a tempfile must be created with mode 0600. + Wed Jul 4 04:22:44 2001 Minero Aoki <aamine@loveruby.net> * lib/net/http.rb (HTTP#request_by_name): arg order changes. diff --git a/lib/tempfile.rb b/lib/tempfile.rb index d4876f9c61..a0c7f4cf3f 100644 --- a/lib/tempfile.rb +++ b/lib/tempfile.rb @@ -55,7 +55,7 @@ class Tempfile < SimpleDelegator @clean_files = Tempfile.callback(tmpname, @protect) ObjectSpace.define_finalizer(self, @clean_files) - @tmpfile = File.open(tmpname, File::RDWR|File::CREAT|File::EXCL) + @tmpfile = File.open(tmpname, File::RDWR|File::CREAT|File::EXCL, 0600) @protect[0] = @tmpfile @tmpname = tmpname super(@tmpfile) |