summaryrefslogtreecommitdiff
path: root/lib/tempfile.rb
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-07-05 17:19:28 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-07-05 17:19:28 +0000
commit7f326a3988c74073619689f51481093885f5c203 (patch)
treec038d7a3306fbabe2e3cac85f9f0f1d6c9398154 /lib/tempfile.rb
parentd59652ef251ce544d9a59e2b651fe1945a94fee5 (diff)
* 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
Diffstat (limited to 'lib/tempfile.rb')
-rw-r--r--lib/tempfile.rb2
1 files changed, 1 insertions, 1 deletions
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)