diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-05 02:25:46 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-05 02:25:46 +0000 |
commit | 002e0ca4280f757bdf30f20c5ed88220059af234 (patch) | |
tree | ddb481474f1e50dcf4283805820cb0e1e4905fc9 /tool | |
parent | 5164e2e43a95caae0e73d0be93785feece9ce59c (diff) | |
download | ruby-002e0ca4280f757bdf30f20c5ed88220059af234.tar.gz |
Create MJIT header with strict permission
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rw-r--r-- | tool/transform_mjit_header.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tool/transform_mjit_header.rb b/tool/transform_mjit_header.rb index 4784a47299..91e4a971d2 100644 --- a/tool/transform_mjit_header.rb +++ b/tool/transform_mjit_header.rb @@ -148,8 +148,10 @@ module MJITHeader end def self.write(code, out) - FileUtils.mkdir_p(File.dirname(out)) - File.binwrite("#{out}.new", code) + # create with strict permission, then will install proper + # permmsion + FileUtils.mkdir_p(File.dirname(out), mode: 0700) + File.binwrite("#{out}.new", code, perm: 0600) FileUtils.mv("#{out}.new", out) end |