From 7f326a3988c74073619689f51481093885f5c203 Mon Sep 17 00:00:00 2001 From: knu Date: Thu, 5 Jul 2001 17:19:28 +0000 Subject: [PATCH] * 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 --- ChangeLog | 4 ++++ lib/tempfile.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a98258902c..4e7cc91546 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri Jul 6 02:15:06 2001 Akinori MUSHA + + * lib/tempfile.rb: a tempfile must be created with mode 0600. + Wed Jul 4 04:22:44 2001 Minero Aoki * 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)