mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
d59652ef25
commit
7f326a3988
2 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue